-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move metro-minify-terser
dependency to metro-transform-worker
, fix pnpm (etc) resolution
#1199
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…x pnpm (etc) resolution Summary: Related: facebook#1172 This is the minimally invasive change to fix resolution of the default `minifierPath: 'metro-minify-terser'`, especially under isolated node_modules layouts. `minifierPath` is required/resolved only from `metro-transform-worker`: - https://github.com/facebook/metro/blob/v0.80.4/packages/metro-transform-worker/src/utils/getMinifier.js#L22 - https://github.com/facebook/metro/blob/v0.80.4/packages/metro-transform-worker/src/index.js#L656 Per the [current docs for `minifierPath`](https://metrobundler.dev/docs/configuration/#minifierpath), a module specifier relative to `metro-transform-worker` is explicitly acceptable: > Type: string (default: 'metro-minify-terser') > Path, or package name resolvable from metro-transform-worker, to the minifier that minifies the code after transformation. Unlike facebook#1172 (thanks tido64 for flagging), this doesn't modify the defaults and can be released in a patch release. The approach in that PR (using fully resolved paths in config) may be the better long-term fix though, so this patch shouldn't be regarded as superseding it. Changelog: ``` - **[Fix]:** Move `metro-minify-terser` dependency to fix resolution under isolated node_modules (pnpm, etc). ``` Differential Revision: D53000650
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Jan 24, 2024
This pull request was exported from Phabricator. Differential Revision: D53000650 |
This pull request has been merged in 8e26460. |
Merged
robhogan
added a commit
that referenced
this pull request
Jan 29, 2024
…x pnpm (etc) resolution (#1199) Summary: Pull Request resolved: #1199 Related: #1172 This is the minimally invasive change to fix resolution of the default `minifierPath: 'metro-minify-terser'`, especially under isolated node_modules layouts. `minifierPath` is required/resolved only from `metro-transform-worker`: - https://github.com/facebook/metro/blob/v0.80.4/packages/metro-transform-worker/src/utils/getMinifier.js#L22 - https://github.com/facebook/metro/blob/v0.80.4/packages/metro-transform-worker/src/index.js#L656 Per the [current docs for `minifierPath`](https://metrobundler.dev/docs/configuration/#minifierpath), a module specifier relative to `metro-transform-worker` is explicitly acceptable: > Type: string (default: 'metro-minify-terser') > Path, or package name resolvable from metro-transform-worker, to the minifier that minifies the code after transformation. Unlike #1172 (thanks tido64 for flagging), this doesn't modify the defaults and can be released in a patch release. The approach in that PR (using fully resolved paths in config) may be the better long-term fix though, so this patch shouldn't be regarded as superseding it. Changelog: ``` - **[Fix]:** Move `metro-minify-terser` dependency to fix resolution under isolated node_modules (pnpm, etc). ``` Reviewed By: huntie Differential Revision: D53000650 fbshipit-source-id: 251f52c17af58c88ebedb387ac92ecbe788772ea
robhogan
added a commit
that referenced
this pull request
Jan 30, 2024
…x pnpm (etc) resolution (#1199) Summary: Pull Request resolved: #1199 Related: #1172 This is the minimally invasive change to fix resolution of the default `minifierPath: 'metro-minify-terser'`, especially under isolated node_modules layouts. `minifierPath` is required/resolved only from `metro-transform-worker`: - https://github.com/facebook/metro/blob/v0.80.4/packages/metro-transform-worker/src/utils/getMinifier.js#L22 - https://github.com/facebook/metro/blob/v0.80.4/packages/metro-transform-worker/src/index.js#L656 Per the [current docs for `minifierPath`](https://metrobundler.dev/docs/configuration/#minifierpath), a module specifier relative to `metro-transform-worker` is explicitly acceptable: > Type: string (default: 'metro-minify-terser') > Path, or package name resolvable from metro-transform-worker, to the minifier that minifies the code after transformation. Unlike #1172 (thanks tido64 for flagging), this doesn't modify the defaults and can be released in a patch release. The approach in that PR (using fully resolved paths in config) may be the better long-term fix though, so this patch shouldn't be regarded as superseding it. Changelog: ``` - **[Fix]:** Move `metro-minify-terser` dependency to fix resolution under isolated node_modules (pnpm, etc). ``` Reviewed By: huntie Differential Revision: D53000650 fbshipit-source-id: 251f52c17af58c88ebedb387ac92ecbe788772ea
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
Merged
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:
Related: #1172
This is the minimally invasive change to fix resolution of the default
minifierPath: 'metro-minify-terser'
, especially under isolated node_modules layouts.minifierPath
is required/resolved only frommetro-transform-worker
:Per the current docs for
minifierPath
, a module specifier relative tometro-transform-worker
is explicitly acceptable:Unlike #1172 (thanks tido64 for flagging), this doesn't modify the defaults and can be released in a patch release. The approach in that PR (using fully resolved paths in config) may be the better long-term fix though, so this patch shouldn't be regarded as superseding it.
Changelog:
Differential Revision: D53000650