diff --git a/package-lock.json b/package-lock.json index 5af6772..82eca4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,6 @@ "@element-plus/icons-vue": "^2.3.2", "@icon-park/vue-next": "^1.4.2", "@microsoft/signalr": "^8.0.7", - "@types/lodash": "^4.14.149", "axios": "^1.7.2", "core-js": "^3.8.3", "dayjs": "^1.11.19", @@ -24,6 +23,8 @@ "vuex-persistedstate": "^4.1.0" }, "devDependencies": { + "@types/lodash": "^4.14.170", + "@types/lodash-es": "^4.17.5", "@types/node": "^25.0.10", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", @@ -41,7 +42,7 @@ "prettier": "^2.4.1", "sass": "^1.32.7", "sass-loader": "^12.0.0", - "typescript": "~4.5.5" + "typescript": "~4.7.4" } }, "node_modules/@achrinza/node-ipc": { @@ -2631,16 +2632,14 @@ "license": "MIT" }, "node_modules/@types/lodash": { - "version": "4.17.7", - "resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.7.tgz", - "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==", - "license": "MIT" + "version": "4.14.170", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.170.tgz", + "integrity": "sha512-bpcvu/MKHHeYX+qeEN8GE7DIravODWdACVA1ctevD8CN24RhPZIKMn9ntfAsrvLfSX3cR5RrBKAbYm9bGs0A+Q==" }, "node_modules/@types/lodash-es": { - "version": "4.17.12", - "resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz", - "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==", - "license": "MIT", + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.5.tgz", + "integrity": "sha512-SHBoI8/0aoMQWAgUHMQ599VM6ZiSKg8sh/0cFqqlQQMyY9uEplc0ULU5yQNzcvdR4ZKa0ey8+vFmahuRbOCT1A==", "dependencies": { "@types/lodash": "*" } @@ -6004,6 +6003,19 @@ "vue": "^3.2.0" } }, + "node_modules/element-plus/node_modules/@types/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-RDvF6wTulMPjrNdCoYRC8gNR880JNGT8uB+REUpC2Ns4pRqQJhGz90wh7rgdXDPpCczF3VGktDuFGVnz8zP7HA==" + }, + "node_modules/element-plus/node_modules/@types/lodash-es": { + "version": "4.17.12", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz", + "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==", + "dependencies": { + "@types/lodash": "*" + } + }, "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", @@ -12069,11 +12081,10 @@ "license": "MIT" }, "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmmirror.com/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "devOptional": true, - "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -14819,16 +14830,16 @@ "dev": true }, "@types/lodash": { - "version": "4.17.7", - "resolved": "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.7.tgz", - "integrity": "sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA==" + "version": "4.14.170", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.170.tgz", + "integrity": "sha512-bpcvu/MKHHeYX+qeEN8GE7DIravODWdACVA1ctevD8CN24RhPZIKMn9ntfAsrvLfSX3cR5RrBKAbYm9bGs0A+Q==" }, "@types/lodash-es": { - "version": "4.17.12", - "resolved": "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz", - "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==", + "version": "4.17.5", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.5.tgz", + "integrity": "sha512-SHBoI8/0aoMQWAgUHMQ599VM6ZiSKg8sh/0cFqqlQQMyY9uEplc0ULU5yQNzcvdR4ZKa0ey8+vFmahuRbOCT1A==", "requires": { - "@types/lodash": "*" + "@types/lodash": "^4.14.170" } }, "@types/mime": { @@ -17135,8 +17146,8 @@ "@element-plus/icons-vue": "^2.3.1", "@floating-ui/dom": "^1.0.1", "@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7", - "@types/lodash": "^4.14.182", - "@types/lodash-es": "^4.17.6", + "@types/lodash": "^4.14.170", + "@types/lodash-es": "^4.17.5", "@vueuse/core": "^9.1.0", "async-validator": "^4.2.5", "dayjs": "^1.11.3", @@ -17146,6 +17157,21 @@ "lodash-unified": "^1.0.2", "memoize-one": "^6.0.0", "normalize-wheel-es": "^1.2.0" + }, + "dependencies": { + "@types/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-RDvF6wTulMPjrNdCoYRC8gNR880JNGT8uB+REUpC2Ns4pRqQJhGz90wh7rgdXDPpCczF3VGktDuFGVnz8zP7HA==" + }, + "@types/lodash-es": { + "version": "4.17.12", + "resolved": "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.12.tgz", + "integrity": "sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ==", + "requires": { + "@types/lodash": "^4.14.170" + } + } } }, "emoji-regex": { @@ -21266,9 +21292,9 @@ "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" }, "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmmirror.com/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "4.7.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", + "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", "devOptional": true }, "undici-types": { diff --git a/package.json b/package.json index 64be6d2..0859830 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "@element-plus/icons-vue": "^2.3.2", "@icon-park/vue-next": "^1.4.2", "@microsoft/signalr": "^8.0.7", - "@types/lodash": "^4.14.149", "axios": "^1.7.2", "core-js": "^3.8.3", "dayjs": "^1.11.19", @@ -26,6 +25,8 @@ "vuex-persistedstate": "^4.1.0" }, "devDependencies": { + "@types/lodash": "^4.14.170", + "@types/lodash-es": "^4.17.5", "@types/node": "^25.0.10", "@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/parser": "^5.4.0", @@ -43,7 +44,11 @@ "prettier": "^2.4.1", "sass": "^1.32.7", "sass-loader": "^12.0.0", - "typescript": "~4.5.5" + "typescript": "~4.7.4" + }, + "overrides": { + "@types/lodash": "^4.14.170", + "@types/lodash-es": "^4.17.5" }, "eslintConfig": { "root": true, diff --git a/vue.config.js b/vue.config.js index 225528b..0bdcc99 100644 --- a/vue.config.js +++ b/vue.config.js @@ -90,16 +90,6 @@ module.exports = { .end() config.when(process.env.NODE_ENV !== 'development', (config) => { - config - .plugin('ScriptExtHtmlWebpackPlugin') - .after('html') - .use('script-ext-html-webpack-plugin', [ - { - // `runtime` must same as runtimeChunk name. default is `runtime` - inline: /runtime\..*\.js$/, - }, - ]) - .end() config.optimization.splitChunks({ chunks: 'all', cacheGroups: { @@ -109,10 +99,10 @@ module.exports = { priority: 10, chunks: 'initial', // only package third parties that are initially dependent }, - elementUI: { - name: 'chunk-elementUI', // split elementUI into a single package + elementPlus: { + name: 'chunk-elementPlus', // split elementPlus into a single package priority: 20, // the weight needs to be larger than libs and app or it will be packaged into libs or app - test: /[\\/]node_modules[\\/]_?element-ui(.*)/, // in order to adapt to cnpm + test: /[\\/]node_modules[\\/]_?element-plus(.*)/, // in order to adapt to cnpm }, commons: { name: 'chunk-commons', @@ -123,11 +113,18 @@ module.exports = { }, }, }) - config.optimization.runtimeChunk('single'), + config.optimization.runtimeChunk('single') + // 复制robots.txt文件到根目录 + config.plugin('copy').use(require('copy-webpack-plugin'), [ { - from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件 - to: './', //到根目录下 + patterns: [ + { + from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件 + to: path.resolve(__dirname, './dist'), //到根目录下 + } + ] } + ]) }) }, } diff --git a/yarn.lock b/yarn.lock index 1f64148..cfa2270 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1341,17 +1341,17 @@ resolved "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== -"@types/lodash-es@*", "@types/lodash-es@^4.17.6": - version "4.17.12" - resolved "https://registry.npmmirror.com/@types/lodash-es/-/lodash-es-4.17.12.tgz" - integrity sha512-0NgftHUcV4v34VhXm8QBSftKVXtbkBG3ViCjs6+eJ5a6y6Mi/jiFGPc1sC7QK+9BFhWrURE3EOggmWaSxL9OzQ== +"@types/lodash-es@^4.17.5": + version "4.17.5" + resolved "https://registry.npmjs.org/@types/lodash-es/-/lodash-es-4.17.5.tgz" + integrity sha512-SHBoI8/0aoMQWAgUHMQ599VM6ZiSKg8sh/0cFqqlQQMyY9uEplc0ULU5yQNzcvdR4ZKa0ey8+vFmahuRbOCT1A== dependencies: "@types/lodash" "*" -"@types/lodash@*", "@types/lodash@^4.14.149", "@types/lodash@^4.14.182": - version "4.17.7" - resolved "https://registry.npmmirror.com/@types/lodash/-/lodash-4.17.7.tgz" - integrity sha512-8wTvZawATi/lsmNu10/j2hk1KEP0IvjubqPE3cu1Xz7xfXXt5oCq3SNUz4fMIP4XGF9Ky+Ue2tBA3hcS7LSBlA== +"@types/lodash@^4.14.170": + version "4.14.170" + resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.170.tgz" + integrity sha512-bpcvu/MKHHeYX+qeEN8GE7DIravODWdACVA1ctevD8CN24RhPZIKMn9ntfAsrvLfSX3cR5RrBKAbYm9bGs0A+Q== "@types/mime@^1": version "1.3.5" @@ -6570,10 +6570,10 @@ typedarray@^0.0.6: resolved "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typescript@*, "typescript@>= 2.7", typescript@>=2, "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@~4.5.5: - version "4.5.5" - resolved "https://registry.npmmirror.com/typescript/-/typescript-4.5.5.tgz" - integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== +typescript@*, "typescript@>= 2.7", typescript@>=2, "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta", typescript@~4.7.4: + version "4.7.4" + resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== undici-types@~7.16.0: version "7.16.0"