Skip to content

Commit

Permalink
feat(tsconfig): use "Bundler" for TS module resolution (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrbrown authored Apr 13, 2024
1 parent ed987d8 commit 99e2689
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/hip-wombats-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bfra.me/tsconfig": minor
---

Set `module` to `ESNext` and `moduleResolution` to `Bundler`
2 changes: 1 addition & 1 deletion packages/tsconfig/test/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('schema', () => {
return t.skip(`Could not fetch ${SCHEMA_URL}, skipping`)
}
const schema = (await response.json()) as JSONSchemaType<TsConfigJson>
const ajv = new Ajv.default({
const ajv = new Ajv({
strict: false,
keywords: ['allowTrailingCommas', 'markdownDescription', 'markdownEnumDescriptions'],
})
Expand Down
4 changes: 2 additions & 2 deletions packages/tsconfig/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"experimentalDecorators": true,
"incremental": true,
"lib": ["ES2022"],
"module": "Node16",
"moduleResolution": "Node16",
"module": "ESNext",
"moduleResolution": "Bundler",
"noImplicitAny": true,
"preserveConstEnums": true,
"resolveJsonModule": true,
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "@bfra.me/tsconfig",
"exclude": ["node_modules", "**/lib/*"]
"compilerOptions": {"noEmit": true, "composite": false, "declaration": false},
"exclude": ["node_modules", "**/lib/*"],
"extends": "@bfra.me/tsconfig"
}

0 comments on commit 99e2689

Please sign in to comment.