我将 Angular App 从 v8 升级到 v9。该项目使用 Angular 8 和 moment.js 导入自定义 UI 库。
当我构建它时:
WARNING in Entry point '@myLib/catalogue' contains deep imports into
'/Users/xyz/Projects/forms-frontend/node_modules/moment/locale/de'.
This is probably not a problem, but may cause the compilation of entry points to be out of order.
Run Code Online (Sandbox Code Playgroud)
在@myLib/catalogue.js库文件中(在 node_modules 文件夹中),moment.js DE 语言环境被导入如下:
import 'moment/locale/de';
Run Code Online (Sandbox Code Playgroud)
ERROR in Failed to compile entry-point @myLib/catalogue (es2015 as esm2015) due to compilation errors:
node_modules/@myLib/catalogue/fesm2015/catalogue.js:213:26 - error NG1010: Value at position 2 in the NgModule.imports …Run Code Online (Sandbox Code Playgroud)