-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathvite.config.ts
45 lines (44 loc) · 1.22 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
import { defineConfig } from "vite";
import path from "path";
import react from "@vitejs/plugin-react-swc";
import mdx from "@mdx-js/rollup";
import remarkFrontmatter from "remark-frontmatter";
import remarkMdxFrontmatter from "remark-mdx-frontmatter";
import remarkGfm from "remark-gfm";
import { VitePWA } from "vite-plugin-pwa";
// https://vite.dev/config/
export default defineConfig({
plugins: [
mdx({
providerImportSource: "@mdx-js/react",
remarkPlugins: [remarkFrontmatter, remarkMdxFrontmatter, remarkGfm],
}),
react(),
VitePWA({
registerType: "autoUpdate",
workbox: {
maximumFileSizeToCacheInBytes: 4000000,
navigateFallbackDenylist: [/\.zip$/, /\.gm9$/],
runtimeCaching: [
{
urlPattern: ({ url }) =>
url.pathname.endsWith(".zip") || url.pathname.endsWith(".gm9"),
handler: "NetworkFirst",
},
],
},
manifest: {
name: "PokemonRNG.com",
short_name: "PokemonRNG.com",
start_url: "/",
display: "standalone",
description: "Guaranteed perfect shinies",
},
}),
],
resolve: {
alias: {
"~": path.resolve(__dirname, "src"),
},
},
});