30 lines
569 B
JavaScript
30 lines
569 B
JavaScript
import { defineConfig } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import { resolve } from "path";
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
root: resolve("./src"),
|
|
server: {
|
|
host: "localhost",
|
|
port: 3000,
|
|
open: false,
|
|
watch: {
|
|
usePolling: true,
|
|
disableGlobbing: false,
|
|
},
|
|
},
|
|
build: {
|
|
outDir: resolve("./static/dist"),
|
|
rollupOptions: {
|
|
input: {
|
|
index: resolve("./src/main.jsx"),
|
|
},
|
|
},
|
|
modulePreload: {
|
|
polyfill: true,
|
|
},
|
|
},
|
|
plugins: [react()],
|
|
});
|