aboutsummaryrefslogtreecommitdiff
path: root/vite.config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vite.config.ts')
-rw-r--r--vite.config.ts27
1 files changed, 27 insertions, 0 deletions
diff --git a/vite.config.ts b/vite.config.ts
new file mode 100644
index 0000000..4b5b0c6
--- /dev/null
+++ b/vite.config.ts
@@ -0,0 +1,27 @@
+import { defineConfig } from 'vite';
+import { VitePWA } from 'vite-plugin-pwa';
+
+// https://vitejs.dev/config/
+export default defineConfig({
+ base: "/",
+ build: {
+ sourcemap: true,
+ assetsDir: "code",
+ },
+ plugins: [
+ VitePWA({
+ strategies: "injectManifest",
+ injectManifest: {
+ swSrc: 'public/sw.js',
+ swDest: 'dist/sw.js',
+ globDirectory: 'dist',
+ globPatterns: [
+ '**/*.{html,js,css,json, png}',
+ ],
+ },
+ devOptions: {
+ enabled: true
+ }
+ })
+ ]
+})