-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.js
50 lines (38 loc) · 863 Bytes
/
vite.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// #region Imports
/*
https://vitejs.dev/guide/using-plugins
Import SvelteKit plugin for Vite
*/
import { sveltekit } from "@sveltejs/kit/vite"
// Import `dotenv` to get environment variables
import dotenv from "dotenv"
// #endregion
// Load environment variables
dotenv.config()
/*
https://vitejs.dev/config/
Define vite config
*/
/** @type {import("vite").UserConfig} */
const config = {
plugins: [
sveltekit()
],
// Development settings
server: {
// Allows devices on same network to access the site
host: true,
// Host on specified port during development
port: process.env.DEV_PORT,
strictPort: true
},
// Preview settings
preview: {
// Allows devices on same network to access the site
host: true,
// Host on specified port during preview
port: process.env.PREV_PORT,
strictPort: true
}
}
export default config