From 06a95d1588ba64f34a4ef911d334c2d352aa399d Mon Sep 17 00:00:00 2001 From: shenzhiqiang Date: Tue, 19 Jul 2022 17:55:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8A=A5=E9=94=99=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sfc.d.ts | 6 ++---- tsconfig.json | 2 +- vue.config.js | 35 ----------------------------------- 3 files changed, 3 insertions(+), 40 deletions(-) delete mode 100644 vue.config.js diff --git a/sfc.d.ts b/sfc.d.ts index 724ab78..56f0be1 100644 --- a/sfc.d.ts +++ b/sfc.d.ts @@ -10,9 +10,7 @@ declare module 'vue/types/options' { } declare module 'vue/types/vue' { interface Vue extends GlobalMixins { - $u: $u, - $scss: any + $u: $u; + $scss: any; } } - -declare var ROUTES=[] diff --git a/tsconfig.json b/tsconfig.json index ca5b7b6..c87c637 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -32,7 +32,7 @@ ] }, "include": [ - "src/**/*.ts", + "**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", diff --git a/vue.config.js b/vue.config.js deleted file mode 100644 index fa5062f..0000000 --- a/vue.config.js +++ /dev/null @@ -1,35 +0,0 @@ -// vue.config.js -const TransformPages = require('uni-read-pages') -const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin') -const { webpack } = new TransformPages() - -module.exports = { - configureWebpack: (config) => { - config.plugins = [ - new webpack.DefinePlugin({ - ROUTES: webpack.DefinePlugin.runtimeValue(() => { - const tfPages = new TransformPages({ - includes: ['path', 'name', 'aliasPath'] - }) - return JSON.stringify(tfPages.routes) - }, true) - }) - ] - // 限制工作线程使用1024MB内存 - // get a reference to the existing ForkTsCheckerWebpackPlugin - const existingForkTsChecker = config.plugins.filter( - p => p instanceof ForkTsCheckerWebpackPlugin - )[0] - // remove the existing ForkTsCheckerWebpackPlugin - // so that we can replace it with our modified version - config.plugins = config.plugins.filter( - p => !(p instanceof ForkTsCheckerWebpackPlugin) - ) - // copy the options from the original ForkTsCheckerWebpackPlugin - // instance and add the memoryLimit property - const forkTsCheckerOptions = existingForkTsChecker.options - forkTsCheckerOptions.memoryLimit = 1024 - config.plugins.push(new ForkTsCheckerWebpackPlugin(forkTsCheckerOptions)) - }, - transpileDependencies: ['uview-ui'] -} -- GitLab