From 95d78158aaf1d81cf3fedf0ddf4db2efbe1781dd Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Thu, 29 Jan 2026 14:52:43 -0500 Subject: [PATCH] fix: configure TypeScript for non-module browser scripts - 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. --- tsconfig.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 3620011..66f7949 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "ES2020", - "module": "ES2020", + "module": "none", "lib": ["ES2020", "DOM"], "outDir": "./web/static", "rootDir": "./web/src", @@ -9,8 +9,6 @@ "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, - "moduleResolution": "node", - "resolveJsonModule": true, "declaration": false, "sourceMap": false, "noUnusedLocals": true,