@H_502_2@
我使用角度4与webpack 2&试图使用AOT,但它给我这个错误:10%构建模块4/5模块1活动…_ modules / intl / locale-data / jsonp / en.jsModuleNotFoundError:找不到模块:错误:无法解析’ ./../$$_gendir/src/app/app.module.ngfactory’in’/ Users / xyz / angular-upgrade / backend / myapp / angular / src’.
这是我的webpack.config:
new AotPlugin({ tsConfigPath: './tsconfig.json',entryModule: './src/app/app.module#AppModule' }),
我用来构建的脚本是:“build”:“rimraf dist&& webpack –config config / webpack.prod.js –progress –profile –bail”
下面是我的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" ] }
解决方法
@H_502_2@