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

Uniapp打包编译小程序时Node-modules被打入主包问题 #5218

Open
doggyegg opened this issue Nov 8, 2024 · 1 comment
Open

Uniapp打包编译小程序时Node-modules被打入主包问题 #5218

doggyegg opened this issue Nov 8, 2024 · 1 comment

Comments

@doggyegg
Copy link

doggyegg commented Nov 8, 2024

Uniapp编译小程序,仅在子包中引用的node-modules依赖也会被打入主包及vendor.js中,导致主包异常的大

@Ldxxxxxxxx
Copy link

把项目根目录下的components和uni_modules移动到子包的目录下,或者可以使用webpack-node-externals这个库来排除node_modules

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