html-webpack-dll-file-plugin

1.0.4 • Public • Published

将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配置,支持数组
    })
  ]
};

Readme

Keywords

none

Package Sidebar

Install

npm i html-webpack-dll-file-plugin

Weekly Downloads

3

Version

1.0.4

License

ISC

Last publish

Collaborators

  • zesonliu