@rabbitcc/autodll-webpack-plugin

0.0.22 • Public • Published

autodll-webpack-plugin

Make dll first, let webpack build fast.

Now only supports webpack4

Usage

const AutoDllWebpackPlugin = require('@rabbitcc/autodll-webpack-plugin')

module.exports = {
  // webpack config options...
  plugins: [
    new AutoDllwebpackplugin()
  ]
}

Interface

type Options = {
  /**
   * dll bundle file name
   * manifest file name
   * cache directory
   * cache file name.
   */
  name: string = 'vendor',
  manifest: string = 'vendor.manifest.json',
  output: string = '.dll',
  cachename: string = 'vendor.cache.json',
  /**
   * force report.
   */
  debug: boolean = false,
  /**
   * disabled.
   */
  disabled: boolean = false,
  /**
   * watch package.json change for rebuild dll.
   */
  watch: boolean = false
  /**
   * modify the dll option before make.
   */
  makeOptions: webpackOption => void = webpackOption => {},
  /**
   * include or exclude anthor packages.
   */
  include: Array<string> = [],
  exclude: Array<string> = [],
  /**
   * If you development on a old browsers like ie8. Perhaps need to add polyfills
   * for es6 feature support, e.g. 'Object.assign'.
   * set this option to 'ture' to prepend babel-polyfill or @babel/polyfill to dll
   * 'options.entry'.
   *
   * Note: this feature require `.babelrc` set 'preset-env.useBuiltins' to 'entry'.
   */
  injectBabelPolyfill: boolean = false
}

Readme

Keywords

none

Package Sidebar

Install

npm i @rabbitcc/autodll-webpack-plugin

Weekly Downloads

1

Version

0.0.22

License

GPL-3.0

Unpacked Size

59.8 kB

Total Files

4

Last publish

Collaborators

  • rabbitcc