From 1db93f0c8fb6c6a1512569b56d94b47287b6abec Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Sat, 5 Apr 2025 21:01:58 +0200 Subject: [PATCH] feat: initial strategies dir --- package.json | 14 ++++++++------ strategies/stale-while-revalidate.js | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 strategies/stale-while-revalidate.js diff --git a/package.json b/package.json index 008ff61..df4538e 100644 --- a/package.json +++ b/package.json @@ -8,13 +8,15 @@ "url": "https://git.sr.ht/~ayoayco/astro-sw" }, "exports": { - ".": { - "import": "./astro-sw.js" - }, - "./globals": { - "import": "./globals.js" - } + ".": "./astro-sw.js", + "./globals": "./globals.js", + "./strategies/*": "./strategies/*" }, + "files": [ + "astro-sw.js", + "globals.js", + "strategies/*" + ], "main": "./astro-sw.js", "type": "module", "engines": { diff --git a/strategies/stale-while-revalidate.js b/strategies/stale-while-revalidate.js new file mode 100644 index 0000000..03132b0 --- /dev/null +++ b/strategies/stale-while-revalidate.js @@ -0,0 +1 @@ +export default () => 'hello world!'