Open MrZWH opened 6 years ago
mac:
module.exports = {
entry: 'index.js',
output: {
filename: 'index.min.js'
}
}
module.exports = {
entry: {
index: 'index.js',
vendor: 'vendor.js'
},
output: {
filename: '[name].min.[hash:5].js'
}
}
typescript:
提取公共代码:
webpack.optimize.CommonsChunkPlugin
{
plugins: [
new webpack.optimize.CommonsChunkPlugin(option)
]
}
webpack 的诞生
为什么需要构建
为什么 Webpack