diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-11-23 20:42:33 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-11-27 17:35:14 +0100 |
commit | 0dfbd129e1d5cc169129cc078b309ed1c36efd18 (patch) | |
tree | d8abfe36e907a252bcea84d86823bc9ab549dd83 /tsconfig.json | |
parent | c91cdb263150efacd3a2fa4f9b2585656cd40b6a (diff) | |
download | nextcloud-server-0dfbd129e1d5cc169129cc078b309ed1c36efd18.tar.gz nextcloud-server-0dfbd129e1d5cc169129cc078b309ed1c36efd18.zip |
fix(config): Adjust typescript config to allow `.ts` imports and Typescript in Vue files
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'tsconfig.json')
-rw-r--r-- | tsconfig.json | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tsconfig.json b/tsconfig.json index 84026597f6f..6049d729938 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,15 @@ { "extends": "@vue/tsconfig/tsconfig.json", - "include": ["./apps/**/*.ts", "./core/**/*.ts", "./*.d.ts"], + "include": ["./apps/**/*.ts", "./apps/**/*.vue", "./core/**/*.ts", "./*.d.ts"], "compilerOptions": { - "types": ["jest", "node", "vue"], + "types": ["jest", "node", "vue", "vue-router"], "outDir": "./dist/", "target": "ESNext", "module": "esnext", - "moduleResolution": "node", + // Set module resolution to bundler and `noEmit` to be able to set `allowImportingTsExtensions`, so we can import Typescript with .ts extension + "moduleResolution": "Bundler", + "allowImportingTsExtensions": true, + "noEmit": true, // Allow ts to import js files "allowJs": true, "allowSyntheticDefaultImports": true, @@ -19,6 +22,7 @@ // these options are overrides used only by ts-node // same as our --compilerOptions flag and our TS_NODE_COMPILER_OPTIONS environment variable "compilerOptions": { + "moduleResolution": "node", "module": "commonjs", "verbatimModuleSyntax": false } |