-
-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(dts-plugin): use cwd
to create Module Federation tsconfig
#3381
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: f93c4c3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for module-federation-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
the context is passed from compiler.context , which value is equal the cwd . So i don't know which cases will be crashed . Can you help provide the reproduce repo that i can check if this is something i miss. |
@2heal1 This issue happens when the CWD is not the same one the code is placed at.
This is the code that appears when running root@PC-Nacho ~/L/C/B/c/6/frontend.module-federation_react_producer@14781b4e0abfed997de62ad25272142930a4f71f# npx tsc --project /tmp/sign-modfed-webpack/node_modules/.federation/tsconfig.9db31af3488c5a510fca4aaf7547c4ce.json
error TS2688: Cannot find type definition file for '@testing-library/jest-dom'.
The file is in the program because:
Entry point of type library '@testing-library/jest-dom' specified in compilerOptions
../../../../../../../tmp/sign-modfed-webpack/node_modules/.federation/tsconfig.9db31af3488c5a510fca4aaf7547c4ce.json:22:7
22 "@testing-library/jest-dom"
~~~~~~~~~~~~~~~~~~~~~~~~~~~
File is entry point of type library specified here.
error TS2688: Cannot find type definition file for 'vitest/globals'.
The file is in the program because:
Entry point of type library 'vitest/globals' specified in compilerOptions
../../../../../../../tmp/sign-modfed-webpack/node_modules/.federation/tsconfig.9db31af3488c5a510fca4aaf7547c4ce.json:21:7
21 "vitest/globals",
~~~~~~~~~~~~~~~~
File is entry point of type library specified here.
Found 2 errors. |
Description
This PR changes the directory to generate the
.federated/tsconfig.${hash}.json
to use the user specifiedcwd
. This fixes issues with Typescript not being able to find packages specified in the tsconfig types' property.Related Issue
#3338
Types of changes
Checklist