aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/vite.config.js
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-06-15 18:14:58 +0800
committercrupest <crupest@outlook.com>2021-06-15 18:14:58 +0800
commit08aed0d21a8e7fd5e225140fa1ee8f0e879841c5 (patch)
tree8dc987e49ce3054f06fe9c30065333a929eafdba /FrontEnd/vite.config.js
parent5c979373b53f40f2d0f263f52071caf8ab188e44 (diff)
downloadtimeline-08aed0d21a8e7fd5e225140fa1ee8f0e879841c5.tar.gz
timeline-08aed0d21a8e7fd5e225140fa1ee8f0e879841c5.tar.bz2
timeline-08aed0d21a8e7fd5e225140fa1ee8f0e879841c5.zip
...
Diffstat (limited to 'FrontEnd/vite.config.js')
-rw-r--r--FrontEnd/vite.config.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/FrontEnd/vite.config.js b/FrontEnd/vite.config.js
index 2e85c36a..ee6f6931 100644
--- a/FrontEnd/vite.config.js
+++ b/FrontEnd/vite.config.js
@@ -3,10 +3,21 @@
*/
import reactRefresh from "@vitejs/plugin-react-refresh";
+import { VitePWA } from "vite-plugin-pwa";
import { defineConfig } from "vite";
export default defineConfig({
- plugins: [reactRefresh()],
+ plugins: [
+ reactRefresh(),
+ VitePWA({
+ strategies: "injectManifest",
+ srcDir: "src",
+ filename: "sw.ts",
+ base: "/",
+ manifest: false,
+ includeAssets: "**",
+ }),
+ ],
resolve: {
alias: [{ find: "@", replacement: "/src" }],
},