Failed to load the script unexpectedly回避
sw.jsとlib.tsを分離してみた
This commit is contained in:
parent
7e5ab7af1b
commit
47d77d14fd
6 changed files with 62 additions and 28 deletions
|
|
@ -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
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue