chore: add vite-plugin-pwa (#230)

This commit is contained in:
boojack 2022-09-18 11:58:03 +08:00 committed by GitHub
parent 050a2d39fa
commit a1066322c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1605 additions and 23 deletions

View File

@ -19,7 +19,8 @@
"react-dom": "^18.1.0",
"react-feather": "^2.0.10",
"react-redux": "^8.0.1",
"react-router-dom": "^6.4.0"
"react-router-dom": "^6.4.0",
"vite-plugin-pwa": "^0.12.8"
},
"devDependencies": {
"@types/lodash-es": "^4.17.5",

View File

@ -1,10 +1,10 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { resolve } from "path";
import { VitePWA } from "vite-plugin-pwa";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
plugins: [react(), VitePWA()],
server: {
host: "0.0.0.0",
port: 3000,
@ -23,9 +23,4 @@ export default defineConfig({
},
},
},
resolve: {
alias: {
"@/": `${resolve(__dirname, "src")}/`,
},
},
});

File diff suppressed because it is too large Load Diff