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

Generate complete source maps #6756

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Jun 26, 2019

The source maps generated previously were mapping the bundled files to the post-Babel files - they weren't mapping to the source files as written.

It looks like this was a result of reactify being used in addition to babel - that transformation must have dropped the source maps.

reactify still needs to be listed as a dependency because it is an unlisted requirement of the boron package, which we use. We don't need to use it to create our bundles though, as Babel already performs the transformations we need.

Before changes:
with_reactify

After changes:
without_reactify

The source maps generated previously were mapping the bundled files to
the post-Babel files - they weren't showing mapping to the source files
as written.

It looks like this was a result of `reactify` being used in addition to
babel - that transformation must have dropped the source maps.

`reactify` still needs to be listed as a dependency because it is
an unlisted requirement of the `boron` package, which we use. We don't
need to use it to create our bundles though, as Babel already performs
the transformations we need.
@Gudahtt Gudahtt requested a review from whymarrh as a code owner June 26, 2019 18:02
Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

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

This is awesome work! Great find! I suspect that we now don't need reactify? Can we uninstall it as a dependency?

@whymarrh
Copy link
Contributor

whymarrh commented Jun 27, 2019

(When uninstalling the dependency, can you patch-add only the lockfile changes you believe are strictly relevant to that uninstall.)

Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

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

I read the PR again and this LGTM! Thanks!

@Gudahtt
Copy link
Member Author

Gudahtt commented Jun 27, 2019

I should add some context about that - @kumavis already created an issue for this problem. It looks like that library isn't actively maintained though.

Perhaps it's worth investigating a few of the forks discussed in this issue. But yeah, as long as we're still using boron, I think the best approach is to leave reactify listed as a dependency.

Edit: Well, after reading that issue again, that fork doesn't show that much promise for us. The alternate proposed, rodal, might though.

@whymarrh
Copy link
Contributor

We're using boron for a single FadeModal animation, I'd be partial to inline-ing that functionality and dropping that dependency, though that can be for a separate PR.

@Gudahtt
Copy link
Member Author

Gudahtt commented Jun 27, 2019

I was curious whether removing reactify changed the resulting bundles at all, so I diffed the JS bundles before and after this change. They're exactly the same.

@Gudahtt Gudahtt merged commit b9f69b5 into MetaMask:develop Jun 27, 2019
@Gudahtt Gudahtt deleted the generate-complete-source-maps branch July 5, 2019 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants