Skip to content

Commit bcc4946

Browse files
committed
fix: Use other baseURL
1 parent d2c12ea commit bcc4946

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vite.config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@ import { enhancedImages } from '@sveltejs/enhanced-img';
33
import { sveltekit } from '@sveltejs/kit/vite';
44
import { defineConfig } from 'vitest/config';
55

6+
const DEPLOY_PRIME_URL = JSON.stringify(process.env.DEPLOY_PRIME_URL || '')
7+
68
export default defineConfig({
79
plugins: [enhancedImages(), sveltekit(), devtoolsJson()],
810
define: {
9-
'__DEPLOY_PRIME_URL__': JSON.stringify(process.env.DEPLOY_PRIME_URL || ''),
11+
'__DEPLOY_PRIME_URL__': process.env.CONTEXT === 'deploy-preview' ? DEPLOY_PRIME_URL : '""',
1012
},
1113
test: {
1214
include: ['src/**/__tests__/*.ts'],

0 commit comments

Comments
 (0)