Replies: 2 comments
-
Try adding your modules in your jest.config.ts or vitest.config.ts ...
resolve: {
alias: {
"@": "/src",
"module/Component": "/@mf-types/module/Component.d.ts",
"./compiled-types/src/components/Component": "/@mf-types/module/compiled-types/src/components/Component.d.ts",
... |
Beta Was this translation helpful? Give feedback.
0 replies
-
Maybe add include? Generally we use the built in TS system that's shipped for module federation and not that typescript package. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to typing my modules using
@module-federation/typescript
So far, is all good, follow the steps I was able to do it.
The problem right now is that when I running my tests I'm having this error:
Cannot find module './@mf-types/@testing-library/jest-dom' from 'jest.setup.js'
And is related on to have the type definitions automatically found for imports:
If I remove that path, the tests works fine, but I lost the automatically type definitions.
My questions is if there is a way to fix this problem without losing the the automatically type definitions, if not how can I made by myself global definitions using the ones that the library provides me?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions