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

vue2 rollup打包失败 #69

Closed
wxdx opened this issue Feb 23, 2023 · 2 comments
Closed

vue2 rollup打包失败 #69

wxdx opened this issue Feb 23, 2023 · 2 comments

Comments

@wxdx
Copy link

wxdx commented Feb 23, 2023

.ministarrc.js
pSxNLIP.png
Compont.vue
pSxNqat.png
编译结果
pSxNXPf.png

去掉

<script> console.log(1122) </script>

就可以打包成功

插件版本

"rollup-plugin-vue": "^5.0.1",
"rollup-plugin-commonjs": "^10.1.0",
"rollup-plugin-node-resolve": "^5.2.0",

@moonrailgun
Copy link
Owner

我不是很了解vue, 我不确定 rollup-plugin-vue插件 能否在 vue2 上面是否能够生效。(因为这是为vue3制作的)

但是我看这个报错是因为script内部没有export任意代码,或许你需要 export default {} ?

image

@wxdx
Copy link
Author

wxdx commented Feb 23, 2023

感谢 明早我试一下

@wxdx wxdx closed this as completed Feb 24, 2023
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