nile/vite.config.js
2023-09-23 15:41:02 +00:00

26 lines
627 B
JavaScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import path from "node:path";
export default () => {
return defineConfig({
plugins: [react()],
server: {
port: process.env.VITE_DEV_PORT ?? 5173,
host: "0.0.0.0",
hmr: {
protocol: process.env.VITE_DEV_PROTOCOL ?? "wss",
},
},
build: {
outDir: "./dist",
},
resolve: {
alias: {
"@": path.resolve("./src"),
"@components": path.resolve("./src/components"),
"@images": path.resolve("./src/images"),
"@css": path.resolve("./src/css")
},
},
});
};