diff options
author | crupest <crupest@outlook.com> | 2021-06-15 18:14:58 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-15 18:14:58 +0800 |
commit | 08aed0d21a8e7fd5e225140fa1ee8f0e879841c5 (patch) | |
tree | 8dc987e49ce3054f06fe9c30065333a929eafdba /FrontEnd/vite.config.js | |
parent | 5c979373b53f40f2d0f263f52071caf8ab188e44 (diff) | |
download | timeline-08aed0d21a8e7fd5e225140fa1ee8f0e879841c5.tar.gz timeline-08aed0d21a8e7fd5e225140fa1ee8f0e879841c5.tar.bz2 timeline-08aed0d21a8e7fd5e225140fa1ee8f0e879841c5.zip |
...
Diffstat (limited to 'FrontEnd/vite.config.js')
-rw-r--r-- | FrontEnd/vite.config.js | 13 |
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" }],
},
|