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.

webpack.config
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
}
};