Skip to content

Commit a711cf1

Browse files
committed
chore: update generated tsconfig defaults
1 parent 34afac0 commit a711cf1

2 files changed

Lines changed: 36 additions & 20 deletions

File tree

packages/wxt/e2e/tests/typescript-project.test.ts

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -323,15 +323,19 @@ describe('TypeScript Project', () => {
323323
----------------------------------------
324324
{
325325
"compilerOptions": {
326+
"lib": ["ESNext", "DOM", "DOM.Iterable"],
326327
"target": "ESNext",
327-
"module": "ESNext",
328-
"moduleResolution": "Bundler",
328+
"module": "Preserve",
329+
"moduleDetection": "force",
330+
"moduleResolution": "bundler",
331+
"allowImportingTsExtensions": true,
332+
"verbatimModuleSyntax": true,
329333
"noEmit": true,
330-
"esModuleInterop": true,
331-
"forceConsistentCasingInFileNames": true,
332-
"resolveJsonModule": true,
333334
"strict": true,
334335
"skipLibCheck": true,
336+
"noFallthroughCasesInSwitch": true,
337+
"noUncheckedIndexedAccess": true,
338+
"noImplicitOverride": true,
335339
"paths": {
336340
"@": [".."],
337341
"@/*": ["../*"],
@@ -367,15 +371,19 @@ describe('TypeScript Project', () => {
367371
----------------------------------------
368372
{
369373
"compilerOptions": {
374+
"lib": ["ESNext", "DOM", "DOM.Iterable"],
370375
"target": "ESNext",
371-
"module": "ESNext",
372-
"moduleResolution": "Bundler",
376+
"module": "Preserve",
377+
"moduleDetection": "force",
378+
"moduleResolution": "bundler",
379+
"allowImportingTsExtensions": true,
380+
"verbatimModuleSyntax": true,
373381
"noEmit": true,
374-
"esModuleInterop": true,
375-
"forceConsistentCasingInFileNames": true,
376-
"resolveJsonModule": true,
377382
"strict": true,
378383
"skipLibCheck": true,
384+
"noFallthroughCasesInSwitch": true,
385+
"noUncheckedIndexedAccess": true,
386+
"noImplicitOverride": true,
379387
"paths": {
380388
"@": ["../src"],
381389
"@/*": ["../src/*"],
@@ -415,15 +423,19 @@ describe('TypeScript Project', () => {
415423
----------------------------------------
416424
{
417425
"compilerOptions": {
426+
"lib": ["ESNext", "DOM", "DOM.Iterable"],
418427
"target": "ESNext",
419-
"module": "ESNext",
420-
"moduleResolution": "Bundler",
428+
"module": "Preserve",
429+
"moduleDetection": "force",
430+
"moduleResolution": "bundler",
431+
"allowImportingTsExtensions": true,
432+
"verbatimModuleSyntax": true,
421433
"noEmit": true,
422-
"esModuleInterop": true,
423-
"forceConsistentCasingInFileNames": true,
424-
"resolveJsonModule": true,
425434
"strict": true,
426435
"skipLibCheck": true,
436+
"noFallthroughCasesInSwitch": true,
437+
"noUncheckedIndexedAccess": true,
438+
"noImplicitOverride": true,
427439
"paths": {
428440
"example": ["../example"],
429441
"example/*": ["../example/*"],

packages/wxt/src/core/generate-wxt-dir.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,19 @@ async function getTsConfigEntry(): Promise<WxtDirFileEntry> {
296296

297297
const text = `{
298298
"compilerOptions": {
299+
"lib": ["ESNext", "DOM", "DOM.Iterable"],
299300
"target": "ESNext",
300-
"module": "ESNext",
301-
"moduleResolution": "Bundler",
301+
"module": "Preserve",
302+
"moduleDetection": "force",
303+
"moduleResolution": "bundler",
304+
"allowImportingTsExtensions": true,
305+
"verbatimModuleSyntax": true,
302306
"noEmit": true,
303-
"esModuleInterop": true,
304-
"forceConsistentCasingInFileNames": true,
305-
"resolveJsonModule": true,
306307
"strict": true,
307308
"skipLibCheck": true,
309+
"noFallthroughCasesInSwitch": true,
310+
"noUncheckedIndexedAccess": true,
311+
"noImplicitOverride": true,
308312
"paths": {
309313
${paths}
310314
}

0 commit comments

Comments
 (0)