Multiple Entry Points in Webpack
You can make multiple entry points. To do this, the entry setting should be made an array:
export default {
entry: [
'./src/test1.js',
'./src/test2.js'
],
};
All entry points will be collected into one common assembly file. If necessary, you can specify a name for this file:
export default {
entry: [
'./src/test1.js',
'./src/test2.js'
],
output: {
filename: 'build.js',
}
};
Make three entry points in your project. Let several modules from other files connect to each point.
Build the project into a bundle.js file.