【发布时间】:2021-09-10 18:09:42
【问题描述】:
我一开始调试就收到这个错误
c:\proj\src\polyfills.ts 依赖于 'core-js/es6/symbol'。 CommonJS 或 AMD 依赖项可能导致优化救助。有关更多信息,请参阅: https://angular.io/guide/build#configuring-commonjs-dependencies
根据以上指导,添加
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"allowedCommonJsDependencies": ["loadash"], // <-- add this key
还附加src/polyfills.ts 也无济于事。 Angular 版本 11。
【问题讨论】:
-
将 core-js 添加到 allowedCommonJsDependencies
-
@danday74 解决了另一个问题:VSC 需要 15 秒才能达到断点,而 F12 没有。请将您的评论发布到答案中,以便我接受。谢谢!
标签: angular visual-studio-code