lasthourcloud/apps/ui/vite.config.js

25 lines
727 B
JavaScript
Raw Normal View History

2022-07-06 09:02:36 +00:00
import { sveltekit } from '@sveltejs/kit/vite';
/** @type {import('vite').UserConfig} */
export default {
plugins: [sveltekit()],
2022-07-11 20:32:27 +00:00
define: {
'GITPOD_WORKSPACE_URL': JSON.stringify(process.env.GITPOD_WORKSPACE_URL)
},
2022-07-06 09:02:36 +00:00
server: {
port: 3000,
2022-07-11 20:32:27 +00: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 09:02:36 +00:00
fs: {
allow: ['./src/lib/locales/']
}
},
}