I need to split my application into 2 different parts, lets say simple app and main app.
Simple app is in pure javascript without any dependencies, and main app is a react application. They both should be available under the same domain with different paths, like ${domain}/simple
and ${domain}/main
.
Is this possible to accomplish with webpack
?
Yes according to their docs this is how you do it
// webpack.config.js
module.exports = {
entry: {
pageOne: './src/pageOne/index.js',
pageTwo: './src/pageTwo/index.js',
pageThree: './src/pageThree/index.js',
},
};
Just created a repo with a working example, if you want to take a better look how to implement it,
here you go https://github.com/MattiSig/multipage-webpack