mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-08-14 02:27:35 -07:00
refactor: migrate to vite
This commit is contained in:
parent
5d041f6db6
commit
5c69694505
7 changed files with 86 additions and 14 deletions
43
frontend/vite.config.js
Normal file
43
frontend/vite.config.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
// import { join, parse, resolve } from "path";
|
||||
// import * as url from "url";
|
||||
// const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
|
||||
|
||||
// function entryPoints(...paths) {
|
||||
// const entries = paths.map(parse).map((entry) => {
|
||||
// const { dir, base, name } = entry;
|
||||
// const key = join(dir, name);
|
||||
// const path = resolve(__dirname, dir, base);
|
||||
// return [key, path];
|
||||
// });
|
||||
|
||||
// const config = Object.fromEntries(entries);
|
||||
// return config;
|
||||
// }
|
||||
|
||||
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",
|
||||
},
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
components: "/src/components",
|
||||
utils: "/src/utils",
|
||||
external: "/src/external",
|
||||
},
|
||||
},
|
||||
build: {
|
||||
outDir: "build",
|
||||
chunkSizeWarningLimit: 1000,
|
||||
},
|
||||
plugins: [react()],
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue