Angular 4 AOT with webpack -


i using angular 4 webpack 2 & trying use aot, giving me error: 10% building modules 4/5 modules 1 active ..._modules/intl/locale-data/jsonp/en.jsmodulenotfounderror: module not found: error: can't resolve './../$$_gendir/src/app/app.module.ngfactory' in '/users/xyz/angular-upgrade/backend/myapp/angular/src'.

this webpack.config:

new aotplugin({   tsconfigpath: './tsconfig.json',   entrymodule: './src/app/app.module#appmodule' }), 

and script using make build is: "build": "rimraf dist && webpack --config config/webpack.prod.js --progress --profile --bail"

below tsconfig.json:

{   "compileroptions": {     "target": "es5",     "module": "commonjs",     "moduleresolution": "node",     "sourcemap": true,     "emitdecoratormetadata": true,     "experimentaldecorators": true,     "lib": ["es2015", "dom"],     "noimplicitany": false,     "suppressimplicitanyindexerrors": true   },   "exclude": [     "node_modules",     "bower_components"   ] } 

aot not support typescript version above 2.0.10 now. need make sure that. also, have change angular modules http, platform-browser, or core angular 2 -- use version 2.4.0 --, because typescript of version 2.0.10 or below not support them!


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -