-
Notifications
You must be signed in to change notification settings - Fork 1.3k
keep old esm directory structure #1011
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
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 37a55b8:
|
tsconfig.json
Outdated
@@ -24,7 +25,7 @@ | |||
}, | |||
"include": [ | |||
"src/**/*", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also update this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#TIL
Importantly, rootDir does not affect which files become part of the compilation. It has no interaction with the include, exclude, or files tsconfig.json settings.
https://www.typescriptlang.org/tsconfig#rootDir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is confusing, so includes
only determines which definitions get generated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rootDir is used to keep the output's directory structure simple and clean
includes determines which file (must be in rootDir) will be compiled by tsc
We should have a separate tsconfig.test.json which is only used for ts-jest
In this way jest-setup.ts
will not affect the output's directory structure anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! ❤️
#932 accidentally changed the esm directory structure.