chore: sync local changes to Gitea
This commit is contained in:
33
client/vite.config.ts
Normal file
33
client/vite.config.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import path from "node:path";
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
const root = path.resolve(__dirname);
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
const isDesktop = mode === "desktop";
|
||||
return {
|
||||
plugins: [react()],
|
||||
root,
|
||||
publicDir: path.join(root, "public"),
|
||||
define: {
|
||||
"import.meta.env.VITE_API_BASE": JSON.stringify(
|
||||
isDesktop ? "https://blog.smyhub.com" : ""
|
||||
)
|
||||
},
|
||||
build: {
|
||||
outDir: path.resolve(__dirname, isDesktop ? "../dist-desktop" : "../dist"),
|
||||
emptyOutDir: true,
|
||||
chunkSizeWarningLimit: 1200
|
||||
},
|
||||
server: {
|
||||
port: 5173,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:8787",
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user