aboutsummaryrefslogtreecommitdiffstats
path: root/tsconfig.json
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-11-23 20:42:33 +0100
committerFerdinand Thiessen <opensource@fthiessen.de>2023-12-05 13:04:29 +0100
commite210caf4cfb71195a53181cb53bab3fdcf893617 (patch)
tree15606e56957addc7299101204eed80d7d41e7afd /tsconfig.json
parent96c477d86d63f198721fa72ae6cef17312de431e (diff)
downloadnextcloud-server-e210caf4cfb71195a53181cb53bab3fdcf893617.tar.gz
nextcloud-server-e210caf4cfb71195a53181cb53bab3fdcf893617.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.json10
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
}