-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Feat/dll webpack plugin #3360
Feat/dll webpack plugin #3360
Conversation
用户需要怎么配置,使用 DLL 之后提升的数据是怎样的 ? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
通过配置 dllEntry 的方式来设置,相对比较繁琐,建议给到一个默认策略,比如所有 dependencies 默认都构建到 dll 中,配置具体 dllEntry 的方式可以作为补充方式,方案上可以借鉴下 https://github.com/ice-lab/ice-scripts/pull/48/files 的思路 |
|
5b3575f
to
91f3f7f
Compare
|
chainConfig.resolve.modules.add(path.resolve(rootDir, 'node_modules')); | ||
|
||
return new Promise((resolve, reject) => { | ||
webpack(chainConfig.toConfig(), err => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在现有 icejs 的架构下支持多任务构建,没必要在单独引入 webpack 进行构建
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
之前有尝试使用多任务构建,但构建时 DllReferencePlugin
报错找不到 DllPlugin
的产物。可能之前使用有问题,我再试下。
使用
复现 目录结构:
index.js // index.js
console.log('index'); webpack.multi.js // webpack.multi.js
const path = require('path');
module.exports = [{
mode: 'production',
entry: './index.js',
output: {
path: path.join(__dirname),
filename: 'build.js'
}
}, {
mode: 'production',
entry: './build.js',
output: {
path: path.join(__dirname),
filename: 'dist.js'
}
}]; 执行 $ webpack-cli --config webpack.multi.js |
No description provided.