html-webpack-dll-file-plugin
v1.0.4
Published
将DllPlugin生成的js和css文件注入到HtmlWebpackPlugin中去
Downloads
10
Readme
将DllPlugin生成的js和css文件注入到HtmlWebpackPlugin中去,需要配合HtmlWebpackPlugin和DllPlugin使用。
使用方法
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var HtmlWebpackDllFilePlugin = require('html-webpack-dll-file-plugin');
var webpackConfig = {
entry: 'index.js',
output: {
path: __dirname + '/dist',
filename: 'index_bundle.js'
},
plugins: [
new HtmlWebpackPlugin(),
new HtmlWebpackDllFilePlugin({
configPath: path.join(__dirname, '../dll/bundle-config.json') // DLLPlugins生成的bundle配置,支持数组
})
]
};