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.2 + Vite 打包报错 openBlock' is not exported by #6

Open
LinTTai opened this issue Mar 31, 2022 · 2 comments
Open

Vue3.2 + Vite 打包报错 openBlock' is not exported by #6

LinTTai opened this issue Mar 31, 2022 · 2 comments

Comments

@LinTTai
Copy link

LinTTai commented Mar 31, 2022

首先感谢作者提供的签名插件,很好用,不过发生了很尴尬的事情

当前环境:Vue 3.2.25,Vite 2.8.0

Vite 打包报错

'openBlock' is not exported by node_modules/vue-esign/node_modules/vue/dist/vue.runtime.esm.js, imported by node_modules/vue-esign/src/index.vue import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue" ^ 269: 270: function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { error during build: Error: 'openBlock' is not exported by node_modules/vue-esign/node_modules/vue/dist/vue.runtime.esm.js, imported by node_modules/vue-esign/src/index.vue

是因为插件包用的Vue是2.x版本吗

@LinTTai LinTTai closed this as completed Mar 31, 2022
@LinTTai LinTTai reopened this Mar 31, 2022
@LinTTai
Copy link
Author

LinTTai commented Mar 31, 2022

'openBlock' is not exported by node_modules/vue-esign/node_modules/vue/dist/vue.runtime.esm.js, imported by node_modules/vue-esign/src/index.vue

D:/Web/openaccount-mob/node_modules/vue-esign/src/index.vue:268:9
266: }
267:
268: import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"
^
269:
270: function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
error during build:
Error: 'openBlock' is not exported by node_modules/vue-esign/node_modules/vue/dist/vue.runtime.esm.js, imported by node_modules/vue-esign/src/index.vue

@zodial
Copy link

zodial commented Apr 8, 2022

首先感谢作者提供的签名插件,很好用,不过发生了很尴尬的事情

当前环境:Vue 3.2.25,Vite 2.8.0

Vite 打包报错

'openBlock' is not exported by node_modules/vue-esign/node_modules/vue/dist/vue.runtime.esm.js, imported by node_modules/vue-esign/src/index.vue import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue" ^ 269: 270: function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { error during build: Error: 'openBlock' is not exported by node_modules/vue-esign/node_modules/vue/dist/vue.runtime.esm.js, imported by node_modules/vue-esign/src/index.vue

是因为插件包用的Vue是2.x版本吗

在vite.config.js的resolve加上dedupe: ['vue']

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

2 participants