I try to upgrade a old grunt webpack based builder (been using since Angular 2 to 7), but now with Angular 8, I cannot upgrade to Ivy.
I have only a cryptic error:
ERROR in bundle.4c959b202dbdca8012b0.js from UglifyJs
Unexpected token: keyword «const» [./node_modules/@angular/forms/__ivy_ngcc__/fesm5/forms.js:29,0][bundle.4c959b202dbdca8012b0.js:69647,0]
My tsconfig.aot.json looks like this:
{
"compilerOptions": {
"skipLibCheck": true,
"outDir": "build/aot",
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": true,
"suppressImplicitAnyIndexErrors": true,
"lib": [
"es5",
"es6",
"dom",
"es2015.collection",
"es2015.promise",
"es2015.core",
"es2016",
"es2017"
]
},
"include": [
"src/angular/**/*",
"test/angular-webpack/**/*"
],
"exclude": [
"node_modules",
"src/angular/bundle.ts",
"test/angular-webpack/angular/bundle.ts",
"test/angular-karma",
"build/browser"
],
"angularCompilerOptions": {
"enableIvy": true,
"annotationsAs": "decorators",
"preserveWhitespaces": false
}
}