Skip to content
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

build: 👷 Update to modern typescript module resolution #1841

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
"allowSyntheticDefaultImports": true,
"emitDeclarationOnly": false,
"noEmit": false,
"target": "esnext",
"module": "esnext",
"esModuleInterop": true,
"moduleResolution": "node"
"esModuleInterop": true
},
"rootDir": "./src",
"include": ["./src/", "./declarations.d.ts"]
Expand Down
8 changes: 3 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
// see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
// "exclude": ["src/components/*.test.tsx", "src/components/*.stories.tsx"],
"compilerOptions": {
"target": "es2020",
"module": "es2020",

"target": "ES2022",
"module": "ESNext",
"moduleResolution": "Bundler",
// This allows our files to use window. Should be removed when RSC is added
"lib": ["dom", "esnext", "DOM.Iterable"],
"importHelpers": true,
Expand All @@ -15,8 +15,6 @@
// match output dir to input dir. e.g. dist/index instead of dist/src/index
// stricter type-checking for stronger correctness. Recommended by TS
"strict": true,
// use Node's module resolution algorithm, instead of the legacy TS one
"moduleResolution": "node",
// transpile JSX to React.createElement
"jsx": "react-jsx",
// interop between ESM and CJS modules. Recommended by TS
Expand Down
Loading