Suppose I have two files, main.js and app.js; how do I use Webpack to bundle both of them into one file: bundle.js?
Suppose I have two files, main.js and app.js; how do I use Webpack to bundle both of them into one file: bundle.js?
You can pass an array of entries:
module.exports = {
entry: ['./main.js', './app.js'],
...
};
Also, you can pass them as a CLI option:
webpack ./main.js ./app.js --config=webpack.config.js
You can use webpack-concat-plugin.