Skip to content

Commit

Permalink
build: 👷 Update to modern typescript module resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
mimarz committed Apr 16, 2024
1 parent 2aec769 commit 7571084
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
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

0 comments on commit 7571084

Please sign in to comment.