coolify/apps/ui/vite.config.js

27 lines
827 B
JavaScript
Raw Normal View History

2022-07-06 11:02:36 +02:00
import { sveltekit } from '@sveltejs/kit/vite';
/** @type {import('vite').UserConfig} */
export default {
plugins: [sveltekit()],
2022-07-11 22:32:27 +02:00
define: {
2022-08-11 10:21:30 +02:00
'GITPOD_WORKSPACE_URL': JSON.stringify(process.env.GITPOD_WORKSPACE_URL),
'CODESANDBOX_HOST': JSON.stringify(process.env.CODESANDBOX_HOST),
2022-07-11 22:32:27 +02:00
},
2022-07-06 11:02:36 +02:00
server: {
2022-08-11 10:18:17 +02:00
host: '0.0.0.0',
port: 3000,
2022-07-11 22:32:27 +02:00
hmr: process.env.GITPOD_WORKSPACE_URL
? {
// Due to port fowarding, we have to replace
// 'https' with the forwarded port, as this
// is the URI created by Gitpod.
host: process.env.GITPOD_WORKSPACE_URL.replace("https://", "3000-"),
protocol: "wss",
clientPort: 443
}
: true,
2022-07-06 11:02:36 +02:00
fs: {
allow: ['./src/lib/locales/']
}
},
}