@pieced/js-config-webpack-plugin
v1.1.18
Published
Automatically configuration webpack5 js loader
Downloads
56
Readme
Automatically configuration webpack5 js loader
Install
npm i --save-dev @pieced/js-config-webpack-pluginWebpack Config
const JsConfigWebpackPlugin = require('@pieced/js-config-webpack-plugin');
module.exports = {
plugins: [new JsConfigWebpackPlugin()],
};Options
suffix
type arraydefault ['js', 'jsx', 'mjs']
filename
type string function (pathData, assetInfo) => string- output.filename
- default
webpack.mode === 'development' ? '[name].js' : 'static/js/[contenthash:10].js'chunkFilename
type string function (pathData, assetInfo) => string- output.chunkFilename
- default
webpack.mode === 'development' ? '[name].js' : 'static/js/[contenthash:10].js'terser
type object- terser-webpack-plugin options
- default
const defaultTerser = {
extractComments: false,
terserOptions: {
output: {
comments: false,
},
compress: {
drop_debugger: true,
drop_console: true,
},
},
}