From f2f8c1629722c99578c87b13d137717352e151e1 Mon Sep 17 00:00:00 2001 From: hzrd149 Date: Tue, 7 Feb 2023 17:04:18 -0600 Subject: [PATCH] add offline cache --- package.json | 2 +- vite.config.ts | 3 ++- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index b859ee27e..1433f619f 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,6 @@ "prettier": "^2.8.1", "typescript": "^4.9.4", "vite": "^4.0.2", - "vite-plugin-pwa": "^0.14.0" + "vite-plugin-pwa": "^0.14.1" } } diff --git a/vite.config.ts b/vite.config.ts index adc1f3891..19e30f626 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,10 +1,11 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; +import { VitePWA } from "vite-plugin-pwa"; // https://vitejs.dev/config/ export default defineConfig({ build: { target: ["chrome89", "edge89", "firefox89", "safari15"], }, - plugins: [react()], + plugins: [react(), VitePWA({ registerType: "autoUpdate" })], }); diff --git a/yarn.lock b/yarn.lock index 45ed19518..4a626b733 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5221,10 +5221,10 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -vite-plugin-pwa@^0.14.0: - version "0.14.0" - resolved "https://registry.yarnpkg.com/vite-plugin-pwa/-/vite-plugin-pwa-0.14.0.tgz#6782874c397cbea4212681db752b43076b56cc99" - integrity sha512-3wZx47PLWTckOQhc8Y6YZjAbNZ89Ovh4TdCT97MGhgl7aFd2LUekVnAmIgFwgMqyxzJ93nmkPF/ALpEW/i2qCg== +vite-plugin-pwa@^0.14.1: + version "0.14.1" + resolved "https://registry.yarnpkg.com/vite-plugin-pwa/-/vite-plugin-pwa-0.14.1.tgz#c32905d77916aab23e86522e2d4882c652f008d5" + integrity sha512-5zx7yhQ8RTLwV71+GA9YsQQ63ALKG8XXIMqRJDdZkR8ZYftFcRgnzM7wOWmQZ/DATspyhPih5wCdcZnAIsM+mA== dependencies: "@rollup/plugin-replace" "^5.0.1" debug "^4.3.4"