v-code-diff icon indicating copy to clipboard operation
v-code-diff copied to clipboard

vue使用CDN引入后,使用v-code-diff报错Uncaught (in promise) TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".

Open huoyuhao opened this issue 2 years ago • 1 comments

vite + vue3 vue本地运行开发无问题,发布打包,由于vue使用CDN,https://unpkg.com/[email protected]/dist/vue.global.js 项目运行报错: v-code-diff是最新版本0.3.11

policy:1 Uncaught (in promise) TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".

huoyuhao avatar Jun 29 '22 08:06 huoyuhao

和这个问题一样不? https://github.com/Shimada666/v-code-diff/issues/24#issuecomment-1103435018

Shimada666 avatar Jun 29 '22 08:06 Shimada666

vue3 + vite
一样是本地开发没问题,但是打包之后部署到服务器就有问题了,看到你之前回的那个问题 一样很迷 不一样 Uncaught TypeError: Failed to resolve module specifier "element-plus". Relative references must start with either "/", "./", or "../".

z-making avatar Nov 01 '22 08:11 z-making

#24 (comment)

看过这个么,将 element plus 也打进去好像能解决问题 https://github.com/MMF-FE/vite-plugin-cdn-import/issues/13

Shimada666 avatar Nov 01 '22 14:11 Shimada666