diff --git a/package.json b/package.json index 470d369a..bd307478 100644 --- a/package.json +++ b/package.json @@ -335,7 +335,7 @@ "unplugin-vue-components": "^0.25.0", "vite": "^4.4.9", "vite-plugin-node-polyfills": "^0.22.0", - "vite-plugin-pwa": "^0.16.0", + "vite-plugin-pwa": "^1.0.0", "vite-plugin-vue-markdown": "^0.23.5", "vite-svg-loader": "^4.0.0", "vitest": "^0.34.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e2f07e26..73b938c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -896,8 +896,8 @@ devDependencies: specifier: ^0.22.0 version: 0.22.0(rollup@2.79.2)(vite@4.4.9) vite-plugin-pwa: - specifier: ^0.16.0 - version: 0.16.0(vite@4.4.9)(workbox-build@7.3.0)(workbox-window@7.3.0) + specifier: ^1.0.0 + version: 1.0.0(vite@4.4.9)(workbox-build@7.3.0)(workbox-window@7.3.0) vite-plugin-vue-markdown: specifier: ^0.23.5 version: 0.23.5(rollup@2.79.2)(vite@4.4.9) @@ -2639,7 +2639,7 @@ packages: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.22.10 '@babel/types': 7.22.10 - debug: 4.3.4 + debug: 4.4.0 globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -6465,7 +6465,7 @@ packages: dependencies: '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.2.2) '@typescript-eslint/utils': 6.4.1(eslint@8.47.0)(typescript@5.2.2) - debug: 4.3.4 + debug: 4.4.0 eslint: 8.47.0 ts-api-utils: 1.0.1(typescript@5.2.2) typescript: 5.2.2 @@ -6520,7 +6520,7 @@ packages: dependencies: '@typescript-eslint/types': 6.4.1 '@typescript-eslint/visitor-keys': 6.4.1 - debug: 4.3.4 + debug: 4.4.0 globby: 11.1.0 is-glob: 4.0.3 semver: 7.7.1 @@ -6584,7 +6584,7 @@ packages: '@typescript-eslint/types': 6.4.1 '@typescript-eslint/typescript-estree': 6.4.1(typescript@5.2.2) eslint: 8.47.0 - semver: 7.5.4 + semver: 7.7.1 transitivePeerDependencies: - supports-color - typescript @@ -8014,7 +8014,7 @@ packages: /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: - semver: 7.5.4 + semver: 7.7.1 dev: true /bwip-js@4.5.1: @@ -10668,6 +10668,17 @@ packages: dependencies: reusify: 1.0.4 + /fdir@6.4.3(picomatch@4.0.2): + resolution: {integrity: sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + dependencies: + picomatch: 4.0.2 + dev: true + /fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -14722,8 +14733,8 @@ packages: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} engines: {node: '>=6'} - /pretty-bytes@6.1.0: - resolution: {integrity: sha512-Rk753HI8f4uivXi4ZCIYdhmG1V+WKzvRMg/X+M42a6t7D07RcmopXJMDNk6N++7Bl75URRGsb40ruvg7Hcp2wQ==} + /pretty-bytes@6.1.1: + resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==} engines: {node: ^14.13.1 || >=16.0.0} dev: true @@ -16592,6 +16603,14 @@ packages: /tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + /tinyglobby@0.2.12: + resolution: {integrity: sha512-qkf4trmKSIiMTs/E63cxH+ojC2unam7rJ0WrauAzpT3ECNTxGRMlaXxVbfxMUC/w0LaYk6jQ4y/nGR9uBO3tww==} + engines: {node: '>=12.0.0'} + dependencies: + fdir: 6.4.3(picomatch@4.0.2) + picomatch: 4.0.2 + dev: true + /tinypool@0.7.0: resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} engines: {node: '>=14.0.0'} @@ -17582,17 +17601,21 @@ packages: - rollup dev: true - /vite-plugin-pwa@0.16.0(vite@4.4.9)(workbox-build@7.3.0)(workbox-window@7.3.0): - resolution: {integrity: sha512-E+AQRzHxqNU4ZhEeR8X37/foZB+ezJEhXauE/mcf1UITY6k2Pa1dtlFl+BQu57fTdiVlWim5S0Qy44Yap93Dkg==} + /vite-plugin-pwa@1.0.0(vite@4.4.9)(workbox-build@7.3.0)(workbox-window@7.3.0): + resolution: {integrity: sha512-X77jo0AOd5OcxmWj3WnVti8n7Kw2tBgV1c8MCXFclrSlDV23ePzv2eTDIALXI2Qo6nJ5pZJeZAuX0AawvRfoeA==} engines: {node: '>=16.0.0'} peerDependencies: - vite: ^3.1.0 || ^4.0.0 - workbox-build: ^7.0.0 - workbox-window: ^7.0.0 + '@vite-pwa/assets-generator': ^1.0.0 + vite: ^3.1.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 + workbox-build: ^7.3.0 + workbox-window: ^7.3.0 + peerDependenciesMeta: + '@vite-pwa/assets-generator': + optional: true dependencies: - debug: 4.3.4 - fast-glob: 3.2.12 - pretty-bytes: 6.1.0 + debug: 4.4.0 + pretty-bytes: 6.1.1 + tinyglobby: 0.2.12 vite: 4.4.9(@types/node@18.19.75)(less@4.2.2) workbox-build: 7.3.0 workbox-window: 7.3.0 @@ -17838,7 +17861,7 @@ packages: espree: 9.6.1 esquery: 1.5.0 lodash: 4.17.21 - semver: 7.5.4 + semver: 7.7.1 transitivePeerDependencies: - supports-color dev: true diff --git a/vite.config.ts b/vite.config.ts index a66af72a..379d97bc 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -57,6 +57,9 @@ export default defineConfig({ svgLoader(), VitePWA({ registerType: 'autoUpdate', + workbox: { + maximumFileSizeToCacheInBytes: 10 * 1024 ** 2, + }, strategies: 'generateSW', manifest: { name: 'IT Tools',