Is there any documentation out there on how to get Angular4 working with webpack with AOT? I checked a number of articles but they dont seem to work properly.
you can use @ngtools/webpack plugin fir this.
Install the plugin and use like this
{
test: /\.ts?$/,
use: '@ngtools/webpack',
}
and add to plugin
new ngtools.AotPlugin({
tsConfigPath: path.join(process.cwd(), 'tsconfig.json'),
entryModule: path.join(process.cwd(), 'src/app/app.module#AppModule')
})
The Angular CLI uses webpack: https://cli.angular.io/
It's pretty nice to use to start projects, the only downside to using the CLI is that you have little (no) control over the webpack configuration.