-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
39 lines (38 loc) · 866 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
32
33
34
35
36
37
38
39
import { version } from './package.json';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { VitePWA } from 'vite-plugin-pwa';
import { replaceCodePlugin as replace } from 'vite-plugin-replace';
import manifestConfig from './manifest.config';
import { assets } from './src/config/website';
// prettier-ignore
export default defineConfig({
plugins: [
VitePWA({
includeAssets: Object.values(assets),
manifest: manifestConfig,
registerType: 'autoUpdate',
}),
vue(),
replace({
replacements: [
{
from: '__DATE__',
to: new Date().toISOString(),
},
{
from: '__VERSION__',
to: version,
},
],
}),
],
optimizeDeps: {
include: ['firebase/app', 'firebase/auth', 'firebase/firestore'],
exclude: ['path'],
},
build: {
chunkSizeWarningLimit: 1000,
sourcemap: true,
},
});