diff --git a/sfc.d.ts b/sfc.d.ts index 724ab784c55ffc08f0e6252ddc56a0dac2a0058e..56f0be101b076994490ef769b56615062b5e741b 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 ca5b7b62540b898473cf62620e301ef8d74ad680..c87c637c9644df5c414e19189b2c347f2278deb5 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 fa5062f076e9449dd0c2fd2526e8fc9cb82159bd..0000000000000000000000000000000000000000 --- 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'] -}