Skip to content
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

Include full error messages in React Native build #15363

Merged
merged 1 commit into from
Apr 9, 2019

Conversation

acdlite
Copy link
Collaborator

@acdlite acdlite commented Apr 9, 2019

The React Native build does not minify error messages in production, but it still needs to run the error messages transform to compile invariant calls to ReactError. To do this, I added a noMinify option to the Babel plugin. I also renamed it from minify-error-messages to the more generic transform-error-messages.

The React Native build does not minify error messages in production,
but it still needs to run the error messages transform to compile
`invariant` calls to `ReactError`. To do this, I added a `noMinify`
option to the Babel plugin. I also renamed it from
`minify-error-messages` to the more generic `transform-error-messages`.
exports[`error transform should support noMinify option 1`] = `
"import _ReactError from 'shared/ReactError';

import invariant from 'shared/invariant';
Copy link
Member

Choose a reason for hiding this comment

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

Is this supposed to remove the import or does some other dead code elimination step do that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah that happens in a subsequent step of the Rollup script

@acdlite acdlite merged commit 875d05d into facebook:master Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants