Skip to content

Commit

Permalink
livepage check
Browse files Browse the repository at this point in the history
  • Loading branch information
Ole994 committed Oct 28, 2024
1 parent 6987e59 commit d24be63
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import react from '@vitejs/plugin-react-swc';
import { visualizer } from 'rollup-plugin-visualizer';
import { VitePWA } from 'vite-plugin-pwa';

// Bruker import.meta.env.MODE for å bestemme miljøet i Vite
const base = import.meta.env.MODE === 'production' ? '/bookingapp/' : '/';

export default defineConfig({
plugins: [
react(),
Expand All @@ -30,7 +33,7 @@ export default defineConfig({
},
}),
],
base: '/',
base, // Dynamisk base-URL
build: {
outDir: 'dist',
rollupOptions: {
Expand Down Expand Up @@ -58,4 +61,3 @@ export default defineConfig({
]
}
});

0 comments on commit d24be63

Please sign in to comment.