mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2024-11-10 09:13:36 +08:00
33 lines
838 B
JavaScript
33 lines
838 B
JavaScript
import process from "node:process";
|
|
import { defineConfig, searchForWorkspaceRoot } from "vite";
|
|
import react from "@vitejs/plugin-react";
|
|
import GenerateLocalesPlugin from "./vite-plugin-generate-locales.js";
|
|
|
|
export default defineConfig({
|
|
base: "/app",
|
|
server: {
|
|
port: 3000,
|
|
strictPort: true,
|
|
proxy: {
|
|
"/auth": "http://127.0.0.1:4000",
|
|
"/api": "http://127.0.0.1:4000",
|
|
"/controller": "http://127.0.0.1:4000",
|
|
},
|
|
fs: {
|
|
allow: [searchForWorkspaceRoot(process.cwd()), "../node_modules"],
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
components: "/src/components",
|
|
utils: "/src/utils",
|
|
external: "/src/external",
|
|
generated: "/src/generated",
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "build",
|
|
chunkSizeWarningLimit: 1000,
|
|
},
|
|
plugins: [react(), GenerateLocalesPlugin()],
|
|
});
|