Webpack
The application is bundled with Webpack 4.
With the package.json dependencies installed the xyz entry code can be bundled with the npm run build
command from the root.
const path = require('path');
module.exports = {
entry: {
xyz: ['./public/js/xyz_entry.js']
},
output: {
path: path.resolve(__dirname, 'public/js/build'),
filename: '[name]_bundle.js'
},
devtool: 'source-map',
module: {
rules: [{
test: /\.js$/,
exclude: /node_modules/
}]
},
optimization: {
concatenateModules: true
},
stats: {
maxModules: Infinity,
optimizationBailout: true
}
};
Last updated