Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在 vue3 中使用报错的问题。 #86

Closed
code-farmer-i opened this issue May 24, 2021 · 2 comments
Closed

在 vue3 中使用报错的问题。 #86

code-farmer-i opened this issue May 24, 2021 · 2 comments

Comments

@code-farmer-i
Copy link
Owner

请确认安装的版本是否为支持vue3的版本。

安装支持 vue3 的版本:

# 使用 npm
npm i @kangc/v-md-editor@next -S

# 使用yarn
yarn add @kangc/v-md-editor@next
@zengbotao
Copy link

生产环境可以正常运行,但使用vite打包时,报错,无法编译:

vite v3.2.4 building for production...
✓ 1603 modules transformed.
'default' is not exported by node_modules/vue/dist/vue.runtime.esm-bundler.js, imported by node_modules/@kangc/v-md-editor/lib/base-editor.js
file: D:/Example/vite_ts_vue3/node_modules/@kangc/v-md-editor/lib/base-editor.js:1:7
1: (function webpackUniversalModuleDefinition(root, factory) {
^
2: if(typeof exports === 'object' && typeof module === 'object')
3: module.exports = factory(require("vue"));
error during build:

@ChrisNi888
Copy link

生产环境可以正常运行,但使用vite打包时,报错,无法编译:

vite v3.2.4 building for production... ✓ 1603 modules transformed. 'default' is not exported by node_modules/vue/dist/vue.runtime.esm-bundler.js, imported by node_modules/@kangc/v-md-editor/lib/base-editor.js file: D:/Example/vite_ts_vue3/node_modules/@kangc/v-md-editor/lib/base-editor.js:1:7 1: (function webpackUniversalModuleDefinition(root, factory) { ^ 2: if(typeof exports === 'object' && typeof module === 'object') 3: module.exports = factory(require("vue")); error during build:

请问这个问题后来解决了吗,我也遇到同样的问题了

error during build:
RollupError: node_modules/.pnpm/@kangc+v-md-editor@2.3.18_@vue+compiler-sfc@3.4.27_vue@3.4.27_typescript@5.3.3_/node_modules/@kangc/v-md-editor/lib/base-editor.js (4:7): "default" is not exported by "vue?commonjs-external", imported by "node_modules/.pnpm/@kangc+v-md-editor@2.3.18_@vue+compiler-sfc@3.4.27_vue@3.4.27_typescript@5.3.3_/node_modules/@kangc/v-md-editor/lib/base-editor.js".
file: E:/L1/CS/Vue/VueProjects/vue_admin_usefastapi3/node_modules/.pnpm/@kangc+v-md-editor@2.3.18_@vue+compiler-sfc@3.4.27_vue@3.4.27_typescript@5.3.3_/node_modules/@kangc/v-md-editor/lib/base-editor.js:4:7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants