facebook / metro

🚇 The JavaScript bundler for React Native
https://metrobundler.dev
MIT License
5.25k stars 626 forks source link

pass custom customTransformOptions and customResolverOptions to bundle_build_started log event #1061

Closed EvanBacon closed 1 year ago

EvanBacon commented 1 year ago

Summary

We use customTransformOptions in Expo CLI to inform Metro that we're bundling for a Node.js environment (in addition to the platform=web), but the logger has no way of indicating to the user that a bundle is Server-specific. This change would enable us to refine the bundling message based on the additional criteria. We can do this if we skip over the server (exports/builds) but it'd be good to have parity. Example usage, corresponding output.

Test plan

facebook-github-bot commented 1 year ago

@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

motiz88 commented 1 year ago

Looks good to me, but there's a Flow error in packages/metro/src/commands/build.js (aren't we running Flow in CircleCI? Maybe not on PRs?)

facebook-github-bot commented 1 year ago

@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

robhogan commented 1 year ago

Maybe not on PRs?

We always used to, but this was turned off on CircleCI for PRs from forks, not sure when/why - I've just re-enabled it.

robhogan commented 1 year ago

Lint error now is due to an internal callsite that needs updating - I'll take care of that.

facebook-github-bot commented 1 year ago

@robhogan merged this pull request in facebook/metro@b2f43eee767b0a4ebd8ce7b84d489d3a9742e409.