From faa6d9b860cdaae3da9922a95716043a1ba3ec15 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 9 Sep 2024 13:40:02 +0200 Subject: [PATCH] chore: Adjust webpack and Typescript config Signed-off-by: Ferdinand Thiessen --- cypress/tsconfig.json | 10 +++++++++- tsconfig.json | 23 +++++++++++------------ webpack.config.ts | 5 +++++ 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json index 0e2edaca5..cff033a4a 100644 --- a/cypress/tsconfig.json +++ b/cypress/tsconfig.json @@ -1,4 +1,12 @@ { "extends": "../tsconfig.json", - "include": ["./**/*.ts"], + "include": ["../*.ts", "."], + "compilerOptions": { + "rootDir": "..", + "types": [ + "cypress", + "dockerode", + "node" + ] + } } diff --git a/tsconfig.json b/tsconfig.json index 0941bc8e7..bd7e31625 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,25 +1,24 @@ { "extends": "@vue/tsconfig/tsconfig.json", - "include": ["./src/**/*.ts"], + "include": ["./src"], "compilerOptions": { - "types": ["cypress", "cypress-visual-regression", "node", "dockerode", "@nextcloud/typings"], - "target": "ESNext", - "module": "esnext", - "moduleResolution": "node", - // Allow ts to import js files - "allowJs": true, - "allowSyntheticDefaultImports": true, - "declaration": false, + "lib": [ + "DOM", + "ESNext" + ], + "rootDir": "src", "noImplicitAny": false, - "resolveJsonModule": true, - "strict": true, }, "ts-node": { // these options are overrides used only by ts-node // same as our --compilerOptions flag and our TS_NODE_COMPILER_OPTIONS environment variable "compilerOptions": { - "module": "commonjs", + "module": "CommonJS", + "target": "ES2015", "verbatimModuleSyntax": false } + }, + "vueCompilerOptions": { + "target": 2.7 } } diff --git a/webpack.config.ts b/webpack.config.ts index 48aefd251..bf2811de6 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -48,4 +48,9 @@ webpackConfig.plugins.push(...[ // Clean dist folder webpackConfig.output.clean = true +webpackConfig.entry = { + init: path.resolve(path.join('src', 'init.ts')), + main: path.resolve(path.join('src', 'main.js')), +} + export default webpackConfig