Use "module": "Preserve" (#19655)

Co-authored-by: Matt Pocock <mattpocockvoice@gmail.com>
This commit is contained in:
Alistair Smith
2025-05-14 18:43:15 -07:00
committed by GitHub
parent a5358fbbd9
commit 6e063fa57b
10 changed files with 13 additions and 9 deletions

View File

@@ -18,7 +18,7 @@ Below is the full set of recommended `compilerOptions` for a Bun project. With t
// Environment setup & latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "ESNext",
"module": "Preserve",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
@@ -34,6 +34,7 @@ Below is the full set of recommended `compilerOptions` for a Bun project. With t
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,

View File

@@ -58,7 +58,7 @@ Then add the following to your `compilerOptions` in `tsconfig.json`:
"compilerOptions": {
"lib": ["ESNext"],
"target": "ESNext",
"module": "ESNext",
"module": "Preserve",
"moduleDetection": "force",
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,

View File

@@ -20,7 +20,7 @@ Bun supports things like top-level await, JSX, and extensioned `.ts` imports, wh
// Environment setup & latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "ESNext",
"module": "Preserve",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
@@ -36,6 +36,7 @@ Bun supports things like top-level await, JSX, and extensioned `.ts` imports, wh
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,