This commit is contained in:
owenchen committed 2026-09-09 16:55:38 +08:00
1 parent ad6ae767bb
commit 71b517f74b
2 files changed
+12 -1

No files matched your search

+11
View File
@@ -50,5 +50,16 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
host: "0.0.0.0",
port: 8088,
},
// ========== 新增打包资源哈希配置 ==========
build: {
rollupOptions: {
output: {
// Rollup 使用 [hash],不是 contenthash
entryFileNames: `assets/[name]-[hash].js`,
chunkFileNames: `assets/[name]-[hash].js`,
assetFileNames: `assets/[name]-[hash].[ext]`,
},
},
},
};
};