This issue is a:
how can I do with multi entry
Here's my nwb config
module.exports = {
type: 'react-app',
webpack: {
extra: {
entry: {
main: './src/client/index.jsx',
chunk: './src/client/chunk/index.jsx',
},
resolve: {
extensions: ['.js', 'index.js', '.jsx'],
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
},
plugins: [
// new HtmlWebpackPlugin({
// inject: true,
// chunks: ['main'],
// template: './src/client/index.html',
// }),
new HtmlWebpackPlugin({
inject: true,
chunks: ['chunk'],
template: './src/client/test.html',
}),
],
},
}
if this is available, what do I need to set for develop
Currently it assumes single entry, and I haven't really looked into what would be involved for multi-entry.
Personally I've never built a multi-entry app with webpack, so I don't have anything to play with - do you have an example of a multi-entry project I could look at?
I got a client-view site & a manage system at the same domain.
They both use same oauth or session model but with a lot of different npm modules.
I think it's more reasonable to build in one project with two entries instead of two projects.
@insin Any updates on this?
@ernieyang09 Were you able to find a workaround to this? We would also like multiple entry points for our app.
Most helpful comment
I got a client-view site & a manage system at the same domain.
They both use same oauth or session model but with a lot of different npm modules.
I think it's more reasonable to build in one project with two entries instead of two projects.