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

[webpack config] Drop workbox support #3729

Merged
merged 10 commits into from
Aug 3, 2021

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Jul 29, 2021

Why

This PR is part of a series of changes that will shift SWs to require local setup.

We don't enable service workers by default (anymore) so it's a bit unfortunate that every project needs to install the code required for adding them (which accounts for a large portion of expo cli). Workbox is also a bit slow to upgrade webpack versions, and that transitively effects our ability to upgrade. Our offline feature only supports SPA styled websites (Expo web default), which means Next.js and Gatsby users end up having to install a bunch of code that they won't be using either.

Workbox uses a lot of deprecated dependencies, which ends up adding lots of warnings to expo-cli installation. Removing workbox will drop the following install warnings when users run npm i -g expo-cli:

npm WARN deprecated @hapi/joi@16.1.8: Switch to 'npm install joi'
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/pinpoint@1.0.2: Moved to 'npm install @sideway/pinpoint'
npm WARN deprecated @hapi/formula@1.2.0: Moved to 'npm install @sideway/formula'
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'

With yarn add expo-cli:

warning expo-cli > xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > @hapi/joi@16.1.8: Switch to 'npm install joi'
warning expo-cli > xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
warning expo-cli > xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
warning expo-cli > xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/topo > @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
warning expo-cli > xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
warning expo-cli > xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/formula@1.2.0: Moved to 'npm install @sideway/formula'
warning expo-cli > xdl > @expo/webpack-config > workbox-webpack-plugin > workbox-build > @hapi/joi > @hapi/pinpoint@1.0.2: Moved to 'npm install @sideway/pinpoint'

This is 28% decrease in warnings.

@EvanBacon EvanBacon requested a review from brentvatne July 29, 2021 05:39
Copy link
Member

@brentvatne brentvatne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plusone

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

Successfully merging this pull request may close these issues.

2 participants