Skip to content

Commit

Permalink
chore: Update viteconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
pierre-castro committed Dec 12, 2024
1 parent 0f96b05 commit 239a969
Showing 1 changed file with 30 additions and 27 deletions.
57 changes: 30 additions & 27 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,35 @@ import path from "path";
import { UserConfig } from "vitest/config";

export default defineConfig(({ mode }) => {
const config: UserConfig = {
plugins: [react()],
server: {
host: true,
port: 5173,
hmr: {
path: "/hmr",
port: 7001,
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"@assets": path.resolve(__dirname, "./src/assets"),
"@common": path.resolve(__dirname, "./src/common"),
"@styles": path.resolve(__dirname, "./src/common/styles"),
},
},
test: {
globals: true,
environment: "jsdom",
},
optimizeDeps: {
include: ["@stripe/stripe-js"], // Ensure Vite pre-bundles this
}
};
const config: UserConfig = {
plugins: [react()],
server: {
host: true,
port: 5173,
hmr: {
path: "/hmr",
port: 7001,
},
watch: {
usePolling: true,
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),
"@assets": path.resolve(__dirname, "./src/assets"),
"@common": path.resolve(__dirname, "./src/common"),
"@styles": path.resolve(__dirname, "./src/common/styles"),
},
},
test: {
globals: true,
environment: "jsdom",
},
optimizeDeps: {
include: ["@stripe/stripe-js"], // Ensure Vite pre-bundles this
}
};

return config;
return config;
});

0 comments on commit 239a969

Please sign in to comment.