-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
81 lines (79 loc) · 2.27 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { VitePWA } from 'vite-plugin-pwa';
const path = require('path');
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
build: {
chunkSizeWarningLimit: 3000,
},
plugins: [
vue(),
VitePWA({
base: '/',
srcDir: 'src',
filename: 'sw.ts',
includeAssets: ['favicon.svg', 'favicon.ico', 'robots.txt', 'apple-touch-icon.png'],
strategies: 'injectManifest',
registerType: 'autoUpdate',
manifest: {
name: 'CharMix',
short_name: 'CharMix',
theme_color: '#06080f',
description:
'CharMix is a word game based on Wordle, but has the following extra features: \n - Can be at any time, no need to wait for the next day to play again; \n - Customizable number of letters of word to guess, between 4 and 10; \n - Customizable number of tries, between 4 and 10; \n - Customizable game language.',
start_url: '/',
display: 'standalone',
background_color: '#06080f',
icons: [
{
src: 'images/android-chrome-192x192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'any maskable',
},
{
src: 'images/android-chrome-512x512.png',
sizes: '512x512',
type: 'image/png',
},
{
src: 'images/apple-touch-icon.png',
type: 'image/png',
},
{
src: 'images/mstile-150x150.png',
sizes: '150x150',
type: 'image/png',
},
{
src: 'images/safari-pinned-tab.png',
type: 'image/png',
},
],
},
injectManifest: {
globPatterns: ['**.{html, js, css, svg, json}', '**'],
globIgnores: ['**/node_modules/**/*'],
maximumFileSizeToCacheInBytes: 3000000,
},
workbox: {
cleanupOutdatedCaches: false,
sourcemap: true,
globIgnores: ['**/node_modules/**/*'],
},
}),
],
css: {
preprocessorOptions: {
scss: {
additionalData: `@import "@/assets/styles/_index.scss";`,
},
},
},
});