Skip to content

Commit 207ea21

Browse files
committed
Set base path for production deployment in Vite configuration
1 parent 227a15b commit 207ea21

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vite.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ import tailwindcss from '@tailwindcss/vite'
55

66
export default defineConfig(({ mode }) => {
77
const env = loadEnv(mode, process.cwd());
8+
// In prod, app will be served under `demo.iex.ec/web3messaging` path
9+
const basePath =
10+
env.SET_SUBPATH_FOR_PROD === 'true' ? '/web3messaging' : '/';
11+
console.log('[vite] Building with base path:', basePath);
812
return {
13+
base: basePath,
914
define: {
1015
'process.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN': JSON.stringify(
1116
env.NEXT_PUBLIC_SECURE_SITE_ORIGIN || 'https://secure.walletconnect.org'

0 commit comments

Comments
 (0)