Skip to content

Commit

Permalink
Merge pull request #89 from Dat-TG/Dat-TG-patch-3
Browse files Browse the repository at this point in the history
fix deploy
  • Loading branch information
Dat-TG authored Jan 15, 2024
2 parents 8aa6c2a + 85832da commit 6575e9d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { defineConfig, loadEnv } from "vite";
import react from "@vitejs/plugin-react-swc";

process.env = { ...process.env, ...loadEnv("all", process.cwd()) };

// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: process.env.VITE_REACT_APP_BASE || "/AdvancedWebFinalProject/",
optimizeDeps: {
exclude: ["js-big-decimal"],
},
export default defineConfig(({ command, mode }) => {
const env = loadEnv(mode, process.cwd(), "");
return {
plugins: [react()],
base: env.VITE_REACT_APP_BASE || "/AdvancedWebFinalProject/",
optimizeDeps: {
exclude: ["js-big-decimal"],
},
};
});

0 comments on commit 6575e9d

Please sign in to comment.