|
@@ -1,6 +1,6 @@
|
|
|
import vue from "@vitejs/plugin-vue";
|
|
|
import vueJsx from "@vitejs/plugin-vue-jsx";
|
|
|
-import { UserConfig, ConfigEnv, loadEnv, defineConfig } from "vite";
|
|
|
+import { ConfigEnv, defineConfig, loadEnv, UserConfig } from "vite";
|
|
|
|
|
|
import AutoImport from "unplugin-auto-import/vite";
|
|
|
import Components from "unplugin-vue-components/vite";
|
|
@@ -14,13 +14,12 @@ import mockDevServerPlugin from "vite-plugin-mock-dev-server";
|
|
|
import UnoCSS from "unocss/vite";
|
|
|
import { resolve } from "path";
|
|
|
import {
|
|
|
- name,
|
|
|
- version,
|
|
|
- engines,
|
|
|
dependencies,
|
|
|
devDependencies,
|
|
|
+ engines,
|
|
|
+ name,
|
|
|
+ version,
|
|
|
} from "./package.json";
|
|
|
-import { directiveHooks } from "@vueuse/core";
|
|
|
|
|
|
/** 平台的名称、版本、运行所需的`node`版本、依赖、构建时间的类型提示 */
|
|
|
const __APP_INFO__ = {
|
|
@@ -199,7 +198,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
|
|
},
|
|
|
// 构建配置
|
|
|
build: {
|
|
|
- chunkSizeWarningLimit: 2000, // 消除打包大小超过500kb警告
|
|
|
+ chunkSizeWarningLimit: 4000, // 消除打包大小超过500kb警告
|
|
|
minify: "terser", // Vite 2.6.x 以上需要配置 minify: "terser", terserOptions 才能生效
|
|
|
terserOptions: {
|
|
|
compress: {
|