diff --git a/tsconfig.bundled.json b/tsconfig.bundled.json new file mode 100644 index 00000000..85f12b34 --- /dev/null +++ b/tsconfig.bundled.json @@ -0,0 +1,26 @@ +{ + "exclude": ["./staticfiles/generated/*", "vite.config.mts", "node_modules/*"], + "compilerOptions": { + "outDir": "./staticfiles/generated/bundled/", + "sourceMap": true, + "noImplicitAny": true, + "module": "esnext", + "target": "es2024", + "allowJs": true, + "moduleResolution": "node", + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "composite": true, + "types": ["alpinejs"], + "paths": { + "#openapi": ["./staticfiles/generated/openapi/client/index.ts"], + "#openapi:*": ["./staticfiles/generated/openapi/client/*"], + "#core:*": ["./core/static/bundled/*"], + "#pedagogy:*": ["./pedagogy/static/bundled/*"], + "#counter:*": ["./counter/static/bundled/*"], + "#com:*": ["./com/static/bundled/*"] + } + } +} diff --git a/tsconfig.json b/tsconfig.json index 25b3cd17..7e438255 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,24 +1,6 @@ { - "compilerOptions": { - "outDir": "./staticfiles/generated/bundled/", - "sourceMap": true, - "noImplicitAny": true, - "module": "esnext", - "target": "es2024", - "allowJs": true, - "moduleResolution": "node", - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - "resolveJsonModule": true, - "types": ["alpinejs"], - "paths": { - "#openapi": ["./staticfiles/generated/openapi/client/index.ts"], - "#openapi:*": ["./staticfiles/generated/openapi/client/*"], - "#core:*": ["./core/static/bundled/*"], - "#pedagogy:*": ["./pedagogy/static/bundled/*"], - "#counter:*": ["./counter/static/bundled/*"], - "#com:*": ["./com/static/bundled/*"] - } - } + "references": [ + {"path": "tsconfig.bundled.json"}, + {"path": "tsconfig.node.json"} + ], } diff --git a/tsconfig.node.json b/tsconfig.node.json new file mode 100644 index 00000000..e24febd8 --- /dev/null +++ b/tsconfig.node.json @@ -0,0 +1,10 @@ +{ + "include": ["vite.config.*"], + "compilerOptions": { + "module": "preserve", + "moduleResolution": "bundler", + "types": ["node"], + "emitDeclarationOnly": true, + "composite": true + } +}