我正在使用webpack构建angular2应用程序。从2.3.1至4.0.1升级angular2之后,的WebPack正在输出以下Warning
:使用webpack构建angular2应用程序 - 无法找到./compiler.es5.ts
WARNING in ./~/@angular/compiler/@angular/compiler.es5.js
Cannot find source file 'compiler.es5.ts': Error: Can't resolve
'./compiler.es5.ts' in '../node_modules\@angular\compiler\@angular'
@ ./~/@angular/platform-browser-dynamic/@angular/platform-browser-dynamic.es5.js 11:0-72
的信息是正确的,因为不存在与在该位置处延伸ts
这样的文件,该文件存在,但具有js
延期。
我错过了webpack配置值吗?
顺便说一句:我没有看到警告,如果我使用@角/ cli v1.0来构建应用程序。
看来它必须使用'source-map-loader'。作为解决方案,我排除了所有node_modules。 –