@pieced/js-config-webpack-plugin

1.0.3 • Public • Published

@pieced/js-config-webpack-plugin 👋

Version Download Webpack Last Commit License: MIT

Automatically configuration webpack5 js loader

Install

npm i --save-dev @pieced/js-config-webpack-plugin

Webpack Config

const JsConfigWebpackPlugin = require('@pieced/js-config-webpack-plugin');
module.exports = {
  plugins: [new JsConfigWebpackPlugin()],
};

Options

suffix

  • type array
  • default ['js', 'jsx', 'mjs']

filename

  • type string function (pathData, assetInfo) => string
  • output.filename
  • default
webpack.mode === 'development' ? '[name].js' : 'static/js/[contenthash:10].js'

chunkFilename

webpack.mode === 'development' ? '[name].js' : 'static/js/[contenthash:10].js'

terser

const defaultTerser = {
  extractComments: false,
  terserOptions: {
    output: {
      comments: false,
    },
    compress: {
      drop_debugger: true,
      drop_console: true,
    },
  },
}

Readme

Keywords

Package Sidebar

Install

npm i @pieced/js-config-webpack-plugin

Weekly Downloads

4

Version

1.0.3

License

MIT

Unpacked Size

12.6 kB

Total Files

5

Last publish

Collaborators

  • adming