mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-03-22 11:08:10 +00:00
36 lines
781 B
JavaScript
36 lines
781 B
JavaScript
// vite.config.js
|
|
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import path from "path";
|
|
import { generateAssetsPlugin } from "./vitePlugins/generateAssetsPlugin.js";
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), generateAssetsPlugin()],
|
|
resolve: {
|
|
alias: {
|
|
"@vitreum": path.resolve(__dirname, "./vitreum"),
|
|
"@sharedStyles": path.resolve(__dirname, "./shared/naturalcrit/styles"),
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "build",
|
|
emptyOutDir: false,
|
|
rollupOptions: {
|
|
output: {
|
|
entryFileNames: "[name]/bundle.js",
|
|
chunkFileNames: "[name]/[name]-[hash].js",
|
|
assetFileNames: "[name]/[name].[ext]",
|
|
},
|
|
},
|
|
},
|
|
define: {
|
|
global: "window.__INITIAL_PROPS__",
|
|
},
|
|
server: {
|
|
port: 8000,
|
|
fs: {
|
|
allow: ["."],
|
|
},
|
|
},
|
|
});
|