Skip to content

Commit eb4420d

Browse files
authored
Remove service worker astro package (#1463)
This will remove caching related to service worker.
1 parent 287af3d commit eb4420d

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

astro.config.mjs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import rehypeSlug from "rehype-slug";
88
import rehypeAutolinkHeadings from "rehype-autolink-headings";
99
import metaTags from "astro-meta-tags";
1010
import deleteUnusedImages from "astro-delete-unused-images";
11-
import serviceWorker from "astrojs-service-worker";
1211
import { execSync } from "node:child_process";
1312
import svelte from "@astrojs/svelte";
1413
import compress from "astro-compress";
@@ -152,29 +151,6 @@ export default defineConfig({
152151
integrations: [
153152
mdx(),
154153
svelte(),
155-
serviceWorker({
156-
workbox: {
157-
inlineWorkboxRuntime: true,
158-
runtimeCaching: [
159-
{
160-
urlPattern:
161-
/\.(?:js|css|json|png|jpg|jpeg|svg|woff2?|ttf|eot|gif)$/,
162-
handler: "CacheFirst",
163-
options: {
164-
cacheName: "assets-cache",
165-
expiration: {
166-
maxEntries: 100,
167-
maxAgeSeconds: 60 * 60 * 1, // 1h
168-
},
169-
},
170-
},
171-
{
172-
urlPattern: /\.html$/,
173-
handler: "NetworkOnly", // ⛔ Don't cache HTML
174-
},
175-
],
176-
},
177-
}),
178154
...(fastBuild
179155
? []
180156
: [

0 commit comments

Comments
 (0)