webpack-dll-loader
v0.0.1
Published
webpack DLLPlugin 生成的script脚本引入
Downloads
8
Readme
webpac-dll-loader
针对于webpack DLLPlugin生成的script脚本映入到相应的html中
使用方法
npm install webpac-dll-loader --save-dev
编译 webpack.product.config.js 配置新增loader配置 例如:
config.module.rules = (config.module.rules || []).concat([{
test: path.resolve(__dirname, '../src/index.html'),
loader: 'webpack-dll-loader',
exclude: "/node_modules/",
options:{
publicPath:'/libs/',
manifest:path.resolve(__dirname, '../dist/production/libs/vendor-manifest.json')
}
}])
参数说明
- publicPath :webpack DLLPlugin编译后存放的目录
- manifest :webpack DLLPlugin编译后生成的manifest.json文件位置