-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
42 lines (41 loc) · 1.31 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
40
41
42
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react-swc'
import { VitePWA } from 'vite-plugin-pwa'
import manifest from './resources/manifest.json'
// https://vitejs.dev/config/
export default defineConfig({
build: {sourcemap: false},
plugins: [
react(),
VitePWA({
injectRegister: 'null',
registerType: 'autoUpdate',
strategies: 'injectManifest',
srcDir: 'src',
filename: 'service-worker.js',
mode: 'production',
includeAssets: ['/generated-icons/NotesTogether-Icon.svg', '/generated-icons/favicon.ico',
'/icons/NotesTogether-icon-gray.svg', '/icons/NotesTogether-Icon-96x96.png',
'/generated-icons/apple-touch-icon-180x180.png'],
injectManifest: {
globPatterns: ['**/*.{js,css,html,woff,woff2,json}'],
globIgnores: ['**/node_modules/**/*', '**/google*.html'],
minify: false,
sourcemap: true,
},
manifest: manifest,
})
],
test: {
environment: 'jsdom',
environmentOptions: {jsdom: {url: "https://testorigin.org/", resources: "usable", pretendToBeVisual: true}},
globals: true,
// testTimeout: 5000,
coverage: {enabled: false},
// clearMocks: true,
mockReset: true,
// restoreMocks: true,
// allowOnly: true,
// slowTestThreshold: 300,
}
})