fix: 前端生产构建放宽node堆内存并跳过basicSsl避免服务器卡死
This commit is contained in:
@ -5,7 +5,13 @@ import basicSsl from "@vitejs/plugin-basic-ssl";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react(), tailwindcss(), basicSsl()],
|
||||
// 🚀 basicSsl 仅 dev(本地 HMR https)需要;生产 build 跳过,
|
||||
// 避免服务器容器低熵环境下生成自签名证书导致 vite build 卡住
|
||||
plugins: [
|
||||
react(),
|
||||
tailwindcss(),
|
||||
...(process.env.NODE_ENV !== "production" ? [basicSsl()] : []),
|
||||
],
|
||||
|
||||
// 🚀 构建优化:将第三方巨头独立分包,利用浏览器缓存
|
||||
build: {
|
||||
|
||||
Reference in New Issue
Block a user