-
-
Notifications
You must be signed in to change notification settings - Fork 240
/
vite.config.ts
31 lines (27 loc) · 883 Bytes
/
vite.config.ts
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
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
import { valueToBoolean } from 'zeed'
const env = process.env
env.BRIEFING_NAME ??= env.npm_package_name
env.BRIEFING_VERSION ??= env.npm_package_version
env.BRIEFING_RELEASE ??= `${env.npm_package_name}@${env.npm_package_version}`
env.BRIEFING_AUTHOR_NAME ??= env.npm_package_author_name
env.BRIEFING_AUTHOR_EMAIL ??= env.npm_package_author_email
const define = {
DEBUG: valueToBoolean(process.env.DEBUG, false),
PRO: valueToBoolean(process.env.PRO, false),
// TEST: valueToBoolean(process.env.TEST, false),
// SERVICE: valueToBoolean(process.env.SERVICE, false),
}
// https://vitejs.dev/config/
export default defineConfig({
envPrefix: ['BRIEFING_', 'APP_', 'VITE_'],
plugins: [vue()],
define,
build: {
outDir: 'www',
sourcemap: true,
minify: true,
target: 'es6',
},
})