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

[webpack] Added unified logging #3766

Merged
merged 14 commits into from
Sep 3, 2021
Merged

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented Aug 12, 2021

Why

  • Remove webpackbar (which is broken) in favor of reusing the loading bar that we use for native.
  • Remove useless info logs from webpack dev server
    • Of course, this adds a new warning that we can't appear to get rid of until updating: ⚠ 「wds」: transportMode is an experimental option, meaning its usage could potentially change without warning
  • Make web warning specific to Webpack › Expo Webpack is in beta, and subject to breaking changes!
  • Fix syntax errors and missing module errors -- making them a bit closer to Metro/native
  • Fix webpack context (moved to [webpack] Use proper project context #3767)

Warnings

  • Add support for bundling warnings (bundling_warning). In a project on web, import import getDevServer from "react-native/Libraries/Core/Devtools/getDevServer"; This will send an event: {"tag":"metro","id":1629222657834,"shouldHide":false,"type":"bundling_warning","warning":"./App.js 12:22-34\n\"export 'default' (imported as 'getDevServer') was not found in 'react-native/Libraries/Core/Devtools/getDevServer'"} which needs to be handled

Currently, warnings are handled as:

Compiled with warnings.
./node_modules/react-native/Libraries/Performance/Systrace.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

Screen Shot 2021-08-17 at 3 08 53 PM

After

Screen Shot 2021-08-17 at 3 08 28 PM

Test Plan

  • expo start -w
  • expo web

Have a project with a import 'missing' and a > where it's not supposed to be.

@EvanBacon EvanBacon marked this pull request as ready for review August 16, 2021 18:25
@EvanBacon EvanBacon mentioned this pull request Aug 24, 2021
84 tasks
@EvanBacon EvanBacon added the Platform: web Using Expo in the browser label Aug 25, 2021
@EvanBacon EvanBacon merged commit a0e0531 into master Sep 3, 2021
@EvanBacon EvanBacon deleted the @evanbacon/webpack/unified-logging branch September 3, 2021 23:48
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.

1 participant