BuptStEve / vuepress-plugin-demo-code

📝 Demo and code plugin for vuepress
https://buptsteve.github.io/vuepress-plugin-demo-code/
MIT License
124 stars 28 forks source link

feat: suppoert esm #51

Open Andyczc opened 1 year ago

Andyczc commented 1 year ago

你的功能请求是否与某些问题相关?请描述 能否添加最新vuepress支持, "vue": "^3.2.47", "vuepress": "2.0.0-beta.61",

描述您想要的解决方案 简洁清晰地描述一下你想要的特性是怎样的。

描述你考虑过的备选方案 简洁清晰地描述一下你考虑过的其他备选方案,可能会有什么问题。

附加上下文 Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: microApp-training/node_modules/@vuepress/utils/dist/index.js require() of ES modules is not supported. require() of microApp-training/node_modules/@vuepress/utils/dist/index.js frommicroApp-training/node_modules/vuepress-plugin-demo-code/src/node/index.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename microApp-training/node_modules/@vuepress/utils/dist/index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from microApp-training/node_modules/@vuepress/utils/package.json.

at new NodeError (internal/errors.js:322:7)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1131:13)
at Module.load (internal/modules/cjs/loader.js:979:32)
BuptStEve commented 1 year ago

pr welcome~ 不好意思,最近比较忙哈