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
Use bundler module resolution in TSConfig #11373
base: main
Are you sure you want to change the base?
Conversation
enable the consumption of package.json#exports, which is what library authors declare as the public API and has replaced package.json#main; Update related depedencies accordingly Read more: https://www.typescriptlang.org/tsconfig/#moduleResolution Co-Authored-By: Alex Sanders <alex@sndrs.dev>
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
Size Change: +885 B (0%) Total Size: 785 kB
ℹ️ View Unchanged
|
@@ -0,0 +1,58 @@ | |||
diff --git a/dist/shared/src/types/props/banner.d.ts b/dist/shared/src/types/props/banner.d.ts |
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.
just for my own understanding/curiosity: what is this file and why/how does it 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.
It applies a apply a pnpm patch
to the dependency, which transforms it to using JSX
type imports, so the tsc
step is successful.
This will not be necessary if the upstream package is fixed in guardian/support-dotcom-components#1119
What does this change?
moduleResolution: bundler
pnpm patch
to braze-components similar to what was done for@guardian/*
packagesWhy?
Enable the consumption of
package.json#exports
, which is what library authors declare as the public API and has replacedpackage.json#main
Known issues
This introduces some peer dependencies mismatch, will be be addressed in a follow-up:
$ pnpm i --resolution-only dotcom-rendering ├─┬ @guardian/braze-components 19.0.0 │ ├── ✕ unmet peer @guardian/source-react-components@^22.1.0: found 23.0.1 │ ├── ✕ unmet peer @guardian/source-react-components-development-kitchen@^19.0.0: found 20.0.1 │ └── ✕ unmet peer react@"17.0.2 || 18.2.0": found 18.3.1 ├─┬ @guardian/eslint-plugin-source-react-components 24.0.0 │ └── ✕ unmet peer @guardian/source-react-components@^22.0.1: found 23.0.1 └── …