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

pull/233/head
boojack 2 years ago committed by GitHub
parent 050a2d39fa
commit a1066322c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

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

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save