-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
31 lines (28 loc) · 865 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 { defineConfig, loadEnv } from 'vite'
import { sentryVitePlugin } from '@sentry/vite-plugin'
import { serwist } from '@serwist/vite'
import react from '@vitejs/plugin-react-swc'
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd())
return {
plugins: [
react(),
sentryVitePlugin({
org: 'sensasi-apps',
project: 'simulasi-grading-sawit',
authToken: env.VITE_SENTRY_AUTH_TOKEN,
}),
serwist({
swSrc: 'src/sw.ts',
swDest: 'sw.js',
globDirectory: 'dist',
injectionPoint: 'self.__SW_MANIFEST',
rollupFormat: 'iife',
}),
],
build: {
sourcemap: true,
},
}
})