Failed to load the script unexpectedly回避

sw.jsとlib.tsを分離してみた
This commit is contained in:
tamaina
2021-11-30 03:12:32 +09:00
parent 7e5ab7af1b
commit 47d77d14fd
6 changed files with 62 additions and 28 deletions

View File

@@ -100,7 +100,12 @@ router.get('/twemoji/(.*)', async ctx => {
// ServiceWorker
router.get('/sw.js', async ctx => {
await send(ctx as any, `/sw.${config.version}.js`, {
await send(ctx as any, `/sw.js`, {
root: swAssets
});
});
router.get(`/sw-lib.${config.version}.js`, async ctx => {
await send(ctx as any, `/sw-lib.js`, {
root: swAssets
});
});