我正在使用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。 –