webpack-build-dll-plugin

1.3.6 • Public • Published

npm MIT Licence TypeScript npm npm

Installation

Install the plugin with npm:

$ npm i webpack-build-dll-plugin -D

Basic Usage

var WebpackBuildDllPlugin = require('webpack-build-dll-plugin');
var webpackConfig = {
  entry: 'index.js',
  output: {
    path: 'dist',
    filename: 'index_bundle.js'
  },
  plugins: [
    // Add plugin BuildPlugin before your DllReference plugin.
    new WebpackBuildDllPlugin({
      // dllConfigPath: required, your Dll Config Path, support absolute path.
      dllConfigPath: './webpack.dll.config.js',
      // forceBuild: default is {false}, when dependencies change, will rebuild DllReference files
      // if {true} it will build DllReference in once upon starting Webpack.
      forceBuild: false
    }),
    new webpack.DllReferencePlugin({
      context: `./${outputPath}`,
      manifest: require(`./${outputPath}/${publicPath}/vendors-manifest${__DEV__ ? '.dev' : '.prod'}.json`)
    })
  ]
};

Dependencies (0)

    Dev Dependencies (3)

    Package Sidebar

    Install

    npm i webpack-build-dll-plugin

    Weekly Downloads

    24

    Version

    1.3.6

    License

    MIT

    Unpacked Size

    14.5 kB

    Total Files

    5

    Last publish

    Collaborators

    • ~myxvisual