-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.js
More file actions
54 lines (53 loc) · 1.65 KB
/
vite.config.js
File metadata and controls
54 lines (53 loc) · 1.65 KB
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
51
52
53
54
import { defineConfig } from 'vite';
import { VitePWA } from 'vite-plugin-pwa';
import authGatePlugin from './vite-plugin-auth-gate.js';
export default defineConfig(({ mode }) => {
return {
clearScreen: false,
base: '/',
resolve: {
alias: {
pocketbase: '/node_modules/pocketbase/dist/pocketbase.es.js',
},
},
optimizeDeps: {
exclude: ['pocketbase', '@ffmpeg/ffmpeg', '@ffmpeg/util'],
},
server: {
host: true,
port: 4173,
strictPort: true,
allowedHosts: ['12ea-109-61-46-145.ngrok-free.app'],
fs: {
allow: ['.', 'node_modules'],
},
},
preview: {
host: true,
allowedHosts: ['12ea-109-61-46-145.ngrok-free.app'],
},
build: {
outDir: 'dist',
emptyOutDir: true,
},
plugins: [
authGatePlugin(),
VitePWA({
registerType: 'prompt',
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,json}'],
cleanupOutdatedCaches: true,
maximumFileSizeToCacheInBytes: 3 * 1024 * 1024,
navigateFallback: '/index.html',
navigateFallbackDenylist: [/^\/_/],
runtimeCaching: [
// ...твои существующие правила
],
},
includeAssets: ['discord.html'],
manifest: false,
base: '/',
}),
],
};
});