Skip to content

Commit 4d09fe1

Browse files
Restore path imports and update base path in Vite configuration for project deployment
1 parent e7f3a88 commit 4d09fe1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { defineConfig } from "vite";
2-
// import path from "path"; // Removed because 'path' is not available in browser environments
3-
// import { fileURLToPath } from 'url';
4-
// import { dirname, resolve } from 'path';
5-
// const __filename = fileURLToPath(import.meta.url);
6-
// const __dirname = dirname(__filename);
7-
export default defineConfig(({ mode }: { mode: string }) => ({
8-
base: "/",
2+
import path from "path"; // Removed because 'path' is not available in browser environments
3+
import { fileURLToPath } from 'url';
4+
import { dirname, resolve } from 'path';
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
export default defineConfig({
8+
base: '/java-fundamentals-for-spring/', // <-- use your repo name here
99
server: {
1010
host: "::",
1111
port: 8080,
@@ -15,4 +15,4 @@ export default defineConfig(({ mode }: { mode: string }) => ({
1515
"@": "/src",
1616
},
1717
},
18-
}));
18+
});

0 commit comments

Comments
 (0)