From 2dbc91653aab6d6cc6b3458ff862cafd1d6b70c9 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期五, 18 四月 2025 14:43:50 +0800
Subject: [PATCH] 新增默认打包配置项
---
vite.config.js | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/vite.config.js b/vite.config.js
index 0567692..9389f4d 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -23,6 +23,21 @@
// https://cn.vitejs.dev/config/#resolve-extensions
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
},
+ // 鎵撳寘閰嶇疆
+ build: {
+ // https://vite.dev/config/build-options.html
+ sourcemap: command === 'build' ? false : 'inline',
+ outDir: 'dist',
+ assetsDir: 'assets',
+ chunkSizeWarningLimit: 2000,
+ rollupOptions: {
+ output: {
+ chunkFileNames: 'static/js/[name]-[hash].js',
+ entryFileNames: 'static/js/[name]-[hash].js',
+ assetFileNames: 'static/[ext]/[name]-[hash].[ext]'
+ }
+ }
+ },
// vite 鐩稿叧閰嶇疆
server: {
port: 80,
--
Gitblit v1.9.3