Skip to content

Commit

Permalink
Merge branch 'dev' into #697-aws-sdk-v3-migration
Browse files Browse the repository at this point in the history
  • Loading branch information
14KGun authored Feb 8, 2024
2 parents 715cfb8 + 4a60374 commit 25a4201
Showing 1 changed file with 27 additions and 24 deletions.
51 changes: 27 additions & 24 deletions packages/web/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "vite";
import { defineConfig, loadEnv } from "vite";
import svgr from "vite-plugin-svgr";

export default defineConfig({
plugins: [svgr(), react({ jsxImportSource: "@emotion/react" })],
envDir: "../..",
envPrefix: "REACT_APP_",
resolve: {
alias: {
"@": "/src",
},
},
build: {
outDir: "./build",
},
server: {
port: 3000,
host: true,
proxy: {
"/api": {
target: process.env.REACT_APP_BACK_URL ?? "http://localhost:9000",
rewrite: (path) => path.replace(/^\/api/, ""),
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, "../..", "REACT_APP_");
return {
plugins: [svgr(), react({ jsxImportSource: "@emotion/react" })],
envDir: "../..",
envPrefix: "REACT_APP_",
resolve: {
alias: {
"@": "/src",
},
"/socket.io": {
target: process.env.REACT_APP_IO_URL ?? "http://localhost:9000",
ws: true,
},
build: {
outDir: "./build",
},
server: {
port: 3000,
host: true,
proxy: {
"/api": {
target: env.REACT_APP_BACK_URL ?? "http://localhost:9000",
rewrite: (path) => path.replace(/^\/api/, ""),
},
"/socket.io": {
target: env.REACT_APP_IO_URL ?? "http://localhost:9000",
ws: true,
},
},
},
},
};
});

0 comments on commit 25a4201

Please sign in to comment.