From 46f46f319ec554b42c0fd7015d48f1c1e674a86f Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Thu, 17 Feb 2022 18:26:20 +0100 Subject: [PATCH] Add typescript support to project --- client/build/webpack.base.conf.js | 12 +---- .../content-block-form/ContentBlockForm.vue | 46 ++++++++++--------- client/src/plugins/modal.d.ts | 13 ++++++ client/src/shims-vue.d.ts | 13 ++++++ client/src/types/index.ts | 8 ++++ 5 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 client/src/plugins/modal.d.ts create mode 100644 client/src/shims-vue.d.ts create mode 100644 client/src/types/index.ts diff --git a/client/build/webpack.base.conf.js b/client/build/webpack.base.conf.js index 686a5217..a05a133a 100644 --- a/client/build/webpack.base.conf.js +++ b/client/build/webpack.base.conf.js @@ -44,23 +44,13 @@ module.exports = { } }, resolve: { - extensions: ['.js', '.vue', '.json', '.gql', '.graphql', '.scss'], + extensions: ['.js', '.ts', '.vue', '.json', '.gql', '.graphql', '.scss'], alias: { '@': resolve('src'), styles: resolve('src/styles'), gql: resolve('src/graphql/gql'), // vue: '@vue/compat', }, - // we probably don't need this anymore - // fallback: { - // // used to be in node: {setImmediate: false,...} - // setImmediate: false, - // dgram: false, - // fs: false, - // net: false, - // tls: false, - // child_process: false, - // }, }, module: { rules: [ diff --git a/client/src/components/content-block-form/ContentBlockForm.vue b/client/src/components/content-block-form/ContentBlockForm.vue index 3ca34b47..3f2cdba3 100644 --- a/client/src/components/content-block-form/ContentBlockForm.vue +++ b/client/src/components/content-block-form/ContentBlockForm.vue @@ -118,21 +118,23 @@ -