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

打包报错 #5

Closed
pengyinghao opened this issue Feb 24, 2023 · 4 comments
Closed

打包报错 #5

pengyinghao opened this issue Feb 24, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@pengyinghao
Copy link

这个错怎么解决呢
image
image

@mlzzen
Copy link

mlzzen commented Feb 27, 2023

来个最简复现的demo

@pengyinghao
Copy link
Author

来个最简复现的demo
demo.zip

@nonzzz nonzzz added the help wanted Extra attention is needed label Feb 27, 2023
@Jane0220
Copy link
Contributor

Jane0220 commented Apr 4, 2023

碰到了一样的问题,参考了隔壁库的解决方案解决的

MMF-FE/vite-plugin-cdn-import#13 (comment)

需要先把vue按cdn引入,然后再把vue-demi按cdn方式引入,再处理其它需要cdn引入的库(比如pinia、ui组件库等)

另外由于打包后加载脚本顺序的关系,不能给cdn文件加defer(打包后的文件先是引入了入口文件,然后再是cdn文件,且入口文件也没有defer属性)

@nonzzz
Copy link
Owner

nonzzz commented Apr 19, 2023

#6

@nonzzz nonzzz closed this as completed Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants