0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-23 02:57:52 +00:00

vite config

This commit is contained in:
Víctor Losada Hernández
2026-01-20 19:39:28 +01:00
parent bfe2c11548
commit 9fe918e2f0

30
vite.config.js Normal file
View File

@@ -0,0 +1,30 @@
// vite.config.js
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "path";
export default defineConfig({
plugins: [react()],
root: "client",
build: {
outDir: "../build",
emptyOutDir: true,
ssrManifest: true,
rollupOptions: {
input: {
admin: path.resolve(__dirname, "client/admin/admin.jsx"),
homebrew: path.resolve(__dirname, "client/homebrew/homebrew.jsx"),
},
output: {
entryFileNames: "[name]/bundle.js",
chunkFileNames: "[name]/[name]-[hash].js",
assetFileNames: "[name]/[name].[ext]",
},
},
},
server: {
fs: {
allow: ["."],
},
},
});