From 5e99463cd0d6f7a642a8e06624a7de7ad4b79fac Mon Sep 17 00:00:00 2001
From: vben <anncwb@126.com>
Date: 星期三, 05 四月 2023 00:20:48 +0800
Subject: [PATCH] perf: Refactor vite configuration

---
 package.json |   44 ++++++++++----------------------------------
 1 files changed, 10 insertions(+), 34 deletions(-)

diff --git a/package.json b/package.json
index 9003e2d..a7c3310 100644
--- a/package.json
+++ b/package.json
@@ -1,13 +1,13 @@
 {
   "name": "vben-admin",
   "version": "2.9.0",
-  "homepage": "https://github.com/anncwb/vue-vben-admin",
+  "homepage": "https://github.com/vbenjs/vue-vben-admin",
   "bugs": {
-    "url": "https://github.com/anncwb/vue-vben-admin/issues"
+    "url": "https://github.com/vbenjs/vue-vben-admin/issues"
   },
   "repository": {
     "type": "git",
-    "url": "git+https://github.com/anncwb/vue-vben-admin.git"
+    "url": "git+https://github.com/vbenjs/vue-vben-admin.git"
   },
   "license": "MIT",
   "author": {
@@ -17,29 +17,23 @@
   },
   "scripts": {
     "bootstrap": "pnpm install",
-    "build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 NODE_ENV=production vite build && esno ./build/script/postBuild.ts",
+    "build": "NODE_ENV=production pnpm vite build",
+    "build:analyze": "pnpm vite build --mode analyze",
     "build:no-cache": "pnpm clean:cache && npm run build",
-    "build:test": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build --mode test && esno ./build/script/postBuild.ts",
-    "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite",
-    "clean:lib": "rimraf node_modules",
+    "build:test": "pnpm vite build --mode test",
     "commit": "czg",
-    "dev": "vite",
-    "gen:icon": "esno ./build/generate/icon/index.ts",
+    "dev": "pnpm vite",
     "preinstall": "npx only-allow pnpm",
     "postinstall": "turbo run stub",
     "lint": "turbo run lint",
     "lint:eslint": "eslint --cache --max-warnings 0  \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
-    "lint:prettier": "prettier --write  \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
+    "lint:prettier": "prettier --write .",
     "lint:stylelint": "stylelint \"**/*.{vue,css,less.scss}\" --fix --cache --cache-location node_modules/.cache/stylelint/",
     "prepare": "husky install",
     "preview": "npm run build && vite preview",
-    "preview:dist": "vite preview",
     "reinstall": "rimraf pnpm-lock.yaml && rimraf package.lock.json && rimraf node_modules && npm run bootstrap",
-    "report": "cross-env REPORT=true npm run build",
     "serve": "npm run dev",
-    "test:br": "npx http-server dist --cors --brotli -c-1",
     "test:gzip": "npx http-server dist --cors --gzip -c-1",
-    "test:unit": "jest",
     "type:check": "vue-tsc --noEmit --skipLibCheck"
   },
   "lint-staged": {
@@ -82,7 +76,7 @@
     "@vueuse/core": "^9.13.0",
     "@vueuse/shared": "^9.13.0",
     "@zxcvbn-ts/core": "^2.2.1",
-    "ant-design-vue": "^3.2.16",
+    "ant-design-vue": "^3.2.17",
     "axios": "^1.3.4",
     "codemirror": "^5.65.12",
     "cropperjs": "^1.5.13",
@@ -121,12 +115,9 @@
     "@purge-icons/generated": "^0.9.0",
     "@types/codemirror": "^5.60.7",
     "@types/crypto-js": "^4.1.1",
-    "@types/fs-extra": "^11.0.1",
-    "@types/inquirer": "^8.2.6",
     "@types/intro.js": "^5.1.1",
     "@types/lodash-es": "^4.17.7",
     "@types/mockjs": "^1.0.7",
-    "@types/node": "^18.15.11",
     "@types/nprogress": "^0.2.0",
     "@types/qrcode": "^1.5.0",
     "@types/qs": "^6.9.7",
@@ -135,6 +126,7 @@
     "@vben/eslint-config": "workspace:*",
     "@vben/stylelint-config": "workspace:*",
     "@vben/ts-config": "workspace:*",
+    "@vben/vite-config": "workspace:*",
     "@vitejs/plugin-vue": "^4.1.0",
     "@vitejs/plugin-vue-jsx": "^3.0.1",
     "@vue/compiler-sfc": "^3.2.47",
@@ -142,32 +134,16 @@
     "cross-env": "^7.0.3",
     "cz-git": "^1.6.1",
     "czg": "^1.6.1",
-    "dotenv": "^16.0.3",
-    "esno": "^0.16.3",
-    "fs-extra": "^11.1.1",
     "husky": "^8.0.3",
-    "inquirer": "^9.1.5",
-    "less": "^4.1.3",
     "lint-staged": "13.2.0",
-    "picocolors": "^1.0.0",
-    "postcss": "^8.4.21",
-    "postcss-html": "^1.5.0",
-    "postcss-less": "^6.0.0",
     "prettier": "^2.8.7",
     "prettier-plugin-packagejson": "^2.4.3",
     "rimraf": "^4.4.1",
-    "rollup-plugin-visualizer": "^5.9.0",
-    "sass": "^1.60.0",
     "turbo": "^1.8.8",
     "typescript": "^5.0.3",
     "unbuild": "^1.2.0",
     "vite": "^4.3.0-beta.1",
-    "vite-plugin-compression": "^0.5.1",
-    "vite-plugin-html": "^3.2.0",
     "vite-plugin-mock": "^2.9.6",
-    "vite-plugin-purge-icons": "^0.9.2",
-    "vite-plugin-svg-icons": "^2.0.1",
-    "vite-plugin-windicss": "^1.8.10",
     "vue-tsc": "^1.2.0"
   },
   "packageManager": "pnpm@8.1.0",

--
Gitblit v1.8.0