Fix missing dependency on metro-transform-worker
#817
Closed
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Currently,
metro-config
callsrequire.resolve('metro-transform-worker')
to establish the default value fortransformerPath
. However,metro-config
doesn't listmetro-transform-worker
as a dependency, so this fails whenmetro-config
is used as a standalone package.It isn't strictly necessary for this value to be an an absolute path in the current implementation - it just needs to be
require
-able from withinmetro
(specificallyDeltaBundler/Worker.js
).This diff documents that
transformerPath
may be a package name, and changes to the default config to just use the default package namemetro-transform-worker
, removing the dependency.Fixes #805
Differential Revision: D36208763