Skip to content

Commit

Permalink
page
Browse files Browse the repository at this point in the history
  • Loading branch information
FloppyDoval committed Dec 11, 2024
1 parent 4affdc3 commit 9d21f25
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
3 changes: 2 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
"homepage": "https://floppydoval.github.io/languageGO",
"scripts": {
"start": "vite",
"dev": "vite",
"test": "npm run test:unit && npm run test:e2e",
"test:unit": "vitest run",
"test:e2e": "playwright test",
"build": "vite build",
"serve": "vite preview",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
},
"dependencies": {
"@clerk/clerk-react": "^5.17.1",
"@clerk/testing": "^1.3.22",
Expand Down
15 changes: 7 additions & 8 deletions client/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { defineConfig, loadEnv } from "vite";

export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), "");
const isProduction = mode === "production";

return {
build: {
outDir: "build",
Expand All @@ -13,27 +15,24 @@ export default defineConfig(({ mode }) => {
"process.env.AUTH_DOMAIN": JSON.stringify(env.AUTH_DOMAIN),
"process.env.PROJECT_ID": JSON.stringify(env.PROJECT_ID),
"process.env.STORAGE_BUCKET": JSON.stringify(env.STORAGE_BUCKET),
"process.env.MESSAGING_SENDER_ID": JSON.stringify(
env.MESSAGING_SENDER_ID
),
"process.env.MESSAGING_SENDER_ID": JSON.stringify(env.MESSAGING_SENDER_ID),
"process.env.APP_ID": JSON.stringify(env.APP_ID),
"process.env.MEASUREMENT_ID": JSON.stringify(env.MEASUREMENT_ID),
"process.env.MAPBOX_TOKEN": JSON.stringify(env.MAPBOX_TOKEN),
"process.env.VITE_CLERK_PUBLISHABLE_KEY": JSON.stringify(
env.VITE_CLERK_PUBLISHABLE_KEY
),
"process.env.VITE_CLERK_PUBLISHABLE_KEY": JSON.stringify(env.VITE_CLERK_PUBLISHABLE_KEY),
},
plugins: [react()],
base: isProduction ? "/languageGO/" : "/", // Dynamically set base for GitHub Pages
server: {
port: 8000,
},
css: {
modules: {
generateScopedName: "[name]__[local]___[hash:base64:5]", // Custom class naming pattern
generateScopedName: "[name]__[local]___[hash:base64:5]",
},
},
test: {
exclude: ["**/e2e/**", "**/node_modules/**"],
},
};
});
});

0 comments on commit 9d21f25

Please sign in to comment.