Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Mar 13, 2020

Why

PWAs in expo web are too fragile, not customizable enough, and only work in the default expo web workflow (not Next.js or Gatsby). The missing parts of Expo webpack made websites feel too much like a template and not enough like a robust website, this fixes that.

  • The new system allows you to generate files manually from a CLI, and customize PWA images individually.
  • expo build:web will automatically skip any PWA asset that's already linked in the project's local web/index.html.
  • Having sharp CLI installed globally will speed up asset generation, if it's not installed, Jimp will be used instead (and log to warn you about the lesser performance).
  • Supplying an empty or invalid setting won't fallback to other values (it's easier than ever before to not create a PWA with Expo).

How

  • Running expo build:web --no-pwa now works to fully disable the PWA files (not offline (pending further input)).
  • Created PWA package/CLI for creating assets and files based on the opinionated app.config.js settings (backgroundColor, resizeMode, image).
  • Deleted WebpackPWAManifestPlugin in favor of a few more scalable plugins.
  • Created Favicon Webpack plugin
  • Create JSON webpack plugin for composing a json file in Webpack memory.
  • Removed default icon, and favicon
  • Moved PWA manifest code to expo/pwa package from expo/config.
  • Removed supportsTablet from expo.web.splash since tablet PWAs cannot be disabled.
  • Created better cache.
  • Created dynamic in-memory cache for remote images.
  • Fix the bug where manifest.json icons has too many images added to it.
  • Ensure logs don't conflict with the loading indicator

@EvanBacon EvanBacon added the Platform: web Using Expo in the browser label Mar 13, 2020
@EvanBacon EvanBacon requested a review from brentvatne March 13, 2020 07:13
@EvanBacon EvanBacon self-assigned this Mar 13, 2020
@EvanBacon EvanBacon mentioned this pull request Mar 16, 2020
84 tasks
@EvanBacon EvanBacon mentioned this pull request Mar 21, 2020
5 tasks
@EvanBacon EvanBacon merged commit 89ad047 into master Mar 26, 2020
@EvanBacon EvanBacon deleted the @evanbacon/webpack/pwa-plugins branch March 26, 2020 05:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: web Using Expo in the browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants