-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathvite.config.ts
More file actions
53 lines (52 loc) · 1.25 KB
/
vite.config.ts
File metadata and controls
53 lines (52 loc) · 1.25 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
/// <reference types="vitest/config" />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { VitePWA } from 'vite-plugin-pwa';
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
manifest: {
name: 'Battle Math - Math Game for Kids',
short_name: 'BattleMath',
description:
'A fun math game for kids! Defeat enemies by solving math problems.',
theme_color: '#FFD93D',
background_color: '#FF8C00',
display: 'standalone',
start_url: '/battlemath/',
scope: '/battlemath/',
icons: [
{
src: 'favicon.ico',
sizes: '64x64 32x32 24x24 16x16',
type: 'image/x-icon',
},
],
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,jpg,mp3,svg}'],
},
}),
],
base: '/battlemath/',
build: {
outDir: 'build',
},
resolve: {
alias: {
'react-native': 'react-native-web',
},
extensions: ['.web.tsx', '.web.ts', '.web.js', '.tsx', '.ts', '.js'],
},
server: {
port: 3000,
open: true,
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/setupTests.ts',
},
});