Skip to content

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

Open
@aral

Description

@aral

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions