I have successfully build angular 10 ivy project with @ngtools/webpack.
Everything works fine but in prod build only issue is that debug function are available, ng.getContext() ng.getHostElement() $0.__ngContext__ etc function are available on browser console.
I tried debugging the cli source code, from what i understood is that angular.json the flag enableOptimization determine the debug info.
How to pass that enableOptimization flag option from angular.json, some how to webpack ngtools.
Note: I'm not using cli.
webpack.prod.js
plugins: [
new webpack.HashedModuleIdsPlugin(),
new CleanWebpackPlugin(),
new webpack.HashedModuleIdsPlugin(),
new AngularCompilerPlugin({
mainPath: resolve('./src/main.ts'),
sourceMap: true,
nameLazyFiles: false,
tsConfigPath: resolve('./tsconfig.json'),
// entryModule: resolve("app/app.module#AppModule" ),
skipCodeGeneration: false,
}),
tsconfig.json
"angularCompilerOptions": {
"skipMetadataEmit": true,
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableIvy": true
}