Skip to content

Commit

Permalink
fix: set base URL in production (vite.config)
Browse files Browse the repository at this point in the history
  • Loading branch information
alifeinbinary committed Oct 9, 2024
1 parent 40f3fb1 commit 0a61eed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { ViteMinifyPlugin } from "vite-plugin-minify";
import Sitemap from "vite-plugin-sitemap";
import { purgeCss } from "vite-plugin-tailwind-purgecss";
// https://vitejs.dev/config/

const mode = process.env.NODE_ENV;
export default defineConfig({
plugins: [
react(),
Expand All @@ -25,7 +27,7 @@ export default defineConfig({
}),
ViteMinifyPlugin({}),
],
base: "/",
base: mode === "production" ? "https://stegg.alifeinbinary.com/" : "/",
build: {
assetsDir: "public",
sourcemap: true,
Expand Down

0 comments on commit 0a61eed

Please sign in to comment.