swパッケージに

This commit is contained in:
tamaina
2021-11-20 14:44:59 +09:00
parent 8db1585f79
commit 6c2a27756c
30 changed files with 429 additions and 20 deletions

View File

@@ -25,6 +25,7 @@ const _dirname = dirname(_filename);
const staticAssets = `${_dirname}/../../../assets/`;
const clientAssets = `${_dirname}/../../../../client/assets/`;
const assets = `${_dirname}/../../../../../built/_client_dist_/`;
const swAssets = `${_dirname}/../../../../../built/_sw_dist_/`;
// Init app
const app = new Koa();
@@ -100,7 +101,7 @@ router.get('/twemoji/(.*)', async ctx => {
// ServiceWorker
router.get('/sw.js', async ctx => {
await send(ctx as any, `/sw.${config.version}.js`, {
root: assets
root: swAssets
});
});