Skip to content

Improve support for service workers #1153

@codedmonkey

Description

@codedmonkey

Service workers are a big part of modern web apps and while it's technically possible to create a service worker with Encore, to my knowledge it isn't straightforward.

  • The service worker needs to exist in a separate entry, with no shared runtime.
  • For the service worker to function correctly without additional server configuration, it needs to exist at the root of the domain.

These hurdles can be overcome with some changes to the Encore configuration, but at this point, it still generates manifest.json and entrypoints.json files for the entry, even though they aren't required and actually collide with the web manifest spec. (why two separate specs use the same manifest.json filename is beyond me, but here we are).

Since Encore is optimized for building full web applications, having first-party support for service workers would be awesome. The JS ecosystem isn't my biggest strength, so apologies if this is already possible with plugins.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions