I have an angular app that is compiled with webpack and uses multiple entry points:
entry: {
'app1': helpers.root('src', 'app1', 'main.ts'),
'app2': helpers.root('src', 'app2', 'main.ts')
}
I use the CommonsChunkPlugin to merge vendor files between these apps, which works great. However, I would now also like to use AOT compilation.
Using @ngtools/webpack I can only aotify one app. Is there a way to do this for both apps?
new ngToolsWebpack.AngularCompilerPlugin({
tsConfigPath: helpers.root('tsconfig.json'),
entryModule: helpers.root('src', '[name]', 'app', 'app.module#AppModule'),
}),
Using [name] (similar to webpack's output) does not work (see above). Is there a way to achieve the same thing another way?