angularjs - 解决针对 CommonJS 或 AMD 依赖项的警告
问题描述
我在终端中收到以下警告。我该如何解决这个问题?(删除警告)
Warning: C:\Users\Sharon\Documents\MyProject\PROJECTOne\node_modules\@azure\core-tracing\dist-esm\src\interfaces.js depends on '@opentelemetry/api'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies
解决方案
您可以删除 CommonJS 或 AMD 依赖项可能会导致优化救助.....通过在 angular.json 的构建部分中添加以下代码片段
"allowedCommonJsDependencies": [
"opentelemetry",
]
如果不起作用,请回复我
推荐阅读
- python - 如何在张量流的神经网络中应用权重约束?
- c++ - 在 Windows 资源管理器中打开公共文档文件夹
- python - 熊猫 - 将日期增加 1
- c# - 使用 AutoMapper + 依赖注入进行映射时访问目标属性(非类型)
- javascript - 如何在反应中使用 howler.js?
- scheduling - 使用间隔进行调度时如何在 CP 中获取当前时间
- reactjs - React Native - Tipsi-stripe 错误 - '无法读取未定义的属性'init''
- c++ - 变量只能全局“声明”,不能修改/(单独初始化)
- c# - 使用带有 x509 证书的 IIS 托管 WCF 服务进行身份验证
- python - 如何在 Python 中为 Google Analytics Reporting API(REST 方法)获取 oauth2-token