-
Notifications
You must be signed in to change notification settings - Fork 3
/
vite.config.js
39 lines (35 loc) · 1.01 KB
/
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
import path from 'path'
import npm from './package.json'
import config from './rougeticket.config.js'
import { sveltekit } from '@sveltejs/kit/vite'
const vite = {
plugins: [sveltekit()],
// exclude: ['dayjs'],
define: {
__APP_NAME__: JSON.stringify(npm.name),
__APP_VERSION__: JSON.stringify(npm.version),
__CONFIG_NAME__: JSON.stringify(config.name),
__CONFIG_TITLE__: JSON.stringify(config.title),
__CONFIG_DESCRIPTION__: JSON.stringify(config.description),
__CONFIG_SHORT_DESCRIPTION__: JSON.stringify(
config.shortDescription || config.description
),
__CONFIG_IMAGE__: JSON.stringify(config.image),
__CONFIG_URL__: JSON.stringify(config.url),
__CONFIG_PLUGINS__: JSON.stringify(JSON.stringify(config.plugins))
},
ssr: {
//
},
server: {
// port: 3000,
},
resolve: {
alias: {
$components: path.resolve('./src/components'),
$stores: path.resolve('./src/stores'),
$icons: path.resolve('./src/icons')
}
}
}
export default vite