Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
aral opened this issue Feb 23, 2019 · 2 comments
Open

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

aral opened this issue Feb 23, 2019 · 2 comments

Comments

@aral
Copy link

aral commented Feb 23, 2019

To reproduce:

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

Expected output:

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

Actual output:

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

Workaround:

In sw.js, add:

var URLS = process.env.FILE_LIST.concat(['index.html', '/']) // cache the index also
@aral aral changed the title process.env.FILE_LIST does not include index.html process.env.FILE_LIST does not include index (service workers) Feb 23, 2019
@ungoldman
Copy link
Member

ungoldman commented Feb 24, 2019

@aral
Copy link
Author

aral commented Feb 25, 2019

Do you think we could get away with tacking ‘index.html’ and ‘/‘ onto the array there or is there a cleaner way to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants