- Change module setting from 'ES2020' to 'none'
- Remove resolveJsonModule and moduleResolution options (incompatible with module: none)
- Prevents TypeScript from adding 'export {}' statements to compiled JS
- Scripts are loaded as regular JavaScript, not ES modules
- Fixes 'Unexpected token export' error in browser
This allows TypeScript type checking while generating plain JavaScript
that works with traditional script tags in HTML.
26 lines
547 B
JSON
26 lines
547 B
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2020",
|
|
"module": "none",
|
|
"lib": ["ES2020", "DOM"],
|
|
"outDir": "./web/static",
|
|
"rootDir": "./web/src",
|
|
"strict": true,
|
|
"esModuleInterop": true,
|
|
"skipLibCheck": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"declaration": false,
|
|
"sourceMap": false,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"noImplicitReturns": true,
|
|
"noFallthroughCasesInSwitch": true
|
|
},
|
|
"include": [
|
|
"web/src/**/*.ts"
|
|
],
|
|
"exclude": [
|
|
"node_modules"
|
|
]
|
|
}
|