From 6d8222ebcbb4ff1074646d65de8b35bcd8404f11 Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期二, 16 十一月 2021 17:13:21 +0800 Subject: [PATCH] ts配置 --- vue.config.js | 13 +++++++++++++ tsconfig.json | 3 ++- package.json | 3 ++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 08a3d4a..80d61bb 100644 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "@vue/eslint-config-prettier": "^5.0.0", "@vue/eslint-config-typescript": "^4.0.0", "babel-eslint": "^10.0.1", + "circular-dependency-plugin": "^5.2.2", "eslint": "^5.16.0", "eslint-plugin-prettier": "^3.1.0", "eslint-plugin-vue": "^5.0.0", @@ -55,7 +56,7 @@ "prettier": "^1.18.2", "sass": "^1.18.0", "sass-loader": "^7.1.0", - "typescript": "~3.2.1", + "typescript": "3.5", "vue-template-compiler": "^2.6.11" }, "eslintConfig": { diff --git a/tsconfig.json b/tsconfig.json index c828706..8b5bd7a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,7 +15,8 @@ "paths": { "@/*": ["src/*"] }, - "lib": ["esnext", "dom", "dom.iterable", "scripthost"] + "lib": ["esnext", "dom", "dom.iterable", "scripthost"], + "skipLibCheck": true }, "include": [ "src/**/*.ts", diff --git a/vue.config.js b/vue.config.js index ad215b7..5547a60 100644 --- a/vue.config.js +++ b/vue.config.js @@ -44,6 +44,8 @@ const serverUrl = "http://192.168.20.189:7009"; //const serverUrl = "http://192.168.20.10:9000"; +const cir = require("circular-dependency-plugin"); + module.exports = { pages, chainWebpack: (config) => { @@ -134,6 +136,17 @@ }, }, }, + configureWebpack: { + plugins: [ + new cir({ + exclude: /a\.js|node_modules/, + include: /dir/, + failOnError: true, + allowAsyncCycles: false, + cwd: process.cwd(), + }), + ], + }, /* css:{ loaderOptions:{ scss:{ -- Gitblit v1.8.0