We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
当前项目是一个多入口的项目
rollupOptions: { input: { main: resolve(__dirname, 'src/index.html'), fastUpload: resolve(__dirname, 'src/fastUpload/index.html'), dataReport: resolve(__dirname, 'src/dataReport/index.html'), download: resolve(__dirname, 'src/download/index.html'), }, },
采用的配置
chunkSplitPlugin({ strategy: 'default', customSplitting: { // `react` and `react-dom` 会被打包到一个名为`render-vendor`的 chunk 里面(包括它们的一些依赖,如 object-assign) 'react-vendor': ['react', 'react-dom'], 'lodash-vendor': ['lodash'], } })
其中node_modules里的 echarts只被dataReport模块依赖,但是也会被打进vendor包里,在index页面加载时也会被加载进去。
如果只用rullupOptions配置是可以做到echarts只被dataReport模块引入的,但是会没有了vendor包
output: { // manualChunks 配置 manualChunks: { 'react-vendor': ['react', 'react-dom'], 'lodash-vendor': ['lodash'], }, },
期待的效果是vendor包中只存在当前模块有依赖的项目。
The text was updated successfully, but these errors were encountered:
我也遇到了这个问题
Sorry, something went wrong.
请问已经解决了么?求个方案,谢谢
No branches or pull requests
当前项目是一个多入口的项目
采用的配置
其中node_modules里的 echarts只被dataReport模块依赖,但是也会被打进vendor包里,在index页面加载时也会被加载进去。
如果只用rullupOptions配置是可以做到echarts只被dataReport模块引入的,但是会没有了vendor包
期待的效果是vendor包中只存在当前模块有依赖的项目。
The text was updated successfully, but these errors were encountered: