Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !1728

PWA-ification, via SWPrecacheWebpackPlugin + manifest.json

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/jeffposnick/pwa into master Mar 05, 2017
  • Overview 33
  • Commits 25
  • Pipelines 0
  • Changes 8

Created by: jeffposnick

This PR adds:

  • Service worker generation via SWPrecacheWebpackPlugin.
  • Helper code to conditionally register the service worker if the browser supports it, and if NODE_ENV === 'production'.
  • A web app manifest and a few additional <meta> tags to supply metadata, which some mobile browsers use during the Add to Homescreen flow.

Using a server worker with a cache-first strategy offers performance advantages, since the network is no longer a bottleneck for fulfilling navigation requests. It does mean, however, that developers (and users) will only see deployed updates are only visible on the "N+1" visit to a page, since previously cached resources are updated in the background. A good portion of this PR involves updating the documentation to try to explain this model to developers, and make sure that it doesn't catch folks by surprise.

Fixes #192 (closed) & fixes #1086 (closed)

CC: @addyosmani @goldhand @ianschmitz @ryansully who provided comments on a provisional version of this PR.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jeffposnick/pwa