Closed zmpo closed 7 months ago
There is another set of components, ng-zorro-antd, which also has a demo.
Switch to the branch with-routing-2
. If I put it in the dependencies, after installing the dependencies and running start:mfe2
, I get the following error:
X [ERROR] Could not resolve "cron-parser"
node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-cron-expression.mjs:9:32:
9 │ import { parseExpression } from 'cron-parser';
╵ ~~~~~~~~~~~~~
You can mark the path "cron-parser" as external to exclude it from the bundle, which will remove
this error and leave the unresolved path in the bundle.
1 of 7 errors shown (disable the message limit with --log-limit=0)
ERR! Error bundling shared npm package
ERR! Build failed with 7 errors:
ERR! node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-cron-expression.mjs:9:32: ERROR: Could not resolve "cron-parser"
ERR! node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-graph.mjs:7:46: ERROR: Could not resolve "d3-shape"
ERR! node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-graph.mjs:8:21: ERROR: Could not resolve "d3-drag"
ERR! node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-graph.mjs:9:32: ERROR: Could not resolve "d3-selection"
ERR! node_modules/ng-zorro-antd/fesm2022/ng-zorro-antd-graph.mjs:10:50: ERROR: Could not resolve "d3-zoom"
ERR! ...
ERR! For more information, run in verbose mode
As i konw cron-parser
is a commonjs
library , Can I move it to devDependencies
? This way, there won't be any errors, but I'm not sure if there might be potential issues, like the one mentioned earlier with Devextreme.
this.dataGrid
results in undefined
. It's called within NavbarComponent
, which is imported from @my-library
.@manfredsteyer
@asollberger Hi, could you help me check if the answer to this question is Yes or No?
Duplicate #533
DevExtreme is a set UI component, it can be used in angular with devextreme-angular.
There is a simple demo
1 NO
If
Devextreme/devextreme-angular
is added todependencies
,npm run start:all
will get this error:2 YES
skipping them in your federation.config.js is not work. Try to move them to
devDependencies
.npm run start:all
success. Inprojects\mfe2\src\app\home\home.component.ts
When i try to call
this.dataGrid
InNavbarComponent
imported from@my-library
, it isundefined
. IfNavbarComponent
is imported from'../navbar/navbar.component'
, it's ok.I suspect that moving the dependency to devDependencies caused the ContentChild to fail.
Question:
Can I move
Devextreme
todevDependencies
?