Failed to load the script unexpectedly回避
sw.jsとlib.tsを分離してみた
This commit is contained in:
@@ -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
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user