increasing max file size for caching

This commit is contained in:
Carter 2025-02-27 12:21:48 -06:00
parent 707d44ead1
commit 34ead6ee9e
2 changed files with 4 additions and 3 deletions

View file

@ -2,20 +2,20 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<meta <meta
name="description" name="description"
content="Web site created using create-react-app" content="Web site created using create-react-app"
/> />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> <link rel="apple-touch-icon" href="/logo192.png" />
<!-- <!--
manifest.json provides metadata used when your web app is installed on a manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
--> -->
<!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> --> <!-- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> -->
<link rel="manifest" href="%PUBLIC_URL%/AdaptiveAgriculture/manifest.json" id="manifest-link" /> <link rel="manifest" href="/AdaptiveAgriculture/manifest.json" id="manifest-link" />
<!-- <!--
Notice the use of %PUBLIC_URL% in the tags above. Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build. It will be replaced with the URL of the `public` folder during the build.

View file

@ -12,6 +12,7 @@ export default defineConfig({
registerType: 'autoUpdate', // Automatically updates the service worker when a new version is available registerType: 'autoUpdate', // Automatically updates the service worker when a new version is available
workbox: { workbox: {
globPatterns: ['**/*.{js,css,html,png,jpg,svg}'], // Cache all common asset types globPatterns: ['**/*.{js,css,html,png,jpg,svg}'], // Cache all common asset types
maximumFileSizeToCacheInBytes: 5 * 1024 * 1024, // 5 MiB
}, },
}), }),
], ],