choojs / choojs/create-choo-app

process.env.FILE_LIST does not include index (service workers)

Open
#68 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
180
Forks
30
PR merge metrics
No merged PRs in 30d

Description

To reproduce:

1. `npx create-choo-app choo-app`
2. `npm run build`
3. `cat dist/sw.js`

Expected output:

```js
!function(){var e=["f496337daa245e10/bundle.js","caa723c7a1b764f2/bundle.css","assets/icon.png","manifest.json", "index.html", "/"]; //…
```

Actual output:

```js
!function(){var e=["f496337daa245e10/bundle.js","caa723c7a1b764f2/bundle.css","assets/icon.png","manifest.json"];
```

Workaround:

In _sw.js_, add:

```js
var URLS = process.env.FILE_LIST.concat(['index.html', '/']) // cache the index also
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.