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

Create sourcemaps for the relay plugin transformation #459

Merged
merged 1 commit into from
Dec 10, 2023

Conversation

tmair
Copy link
Contributor

@tmair tmair commented Sep 28, 2022

This PR fixes broken sourcemaps when using this plugin. The issue is, that the transfomations made by the babel-plugin-relay transformation will not be tracked by vite if we return null for the source maps. Vite therefore treats the transformations made by this plugin as a noop from a sourcemap perspective. Since the plugin introduces several whitespaces, sourcemaps are practically unusable.

Vite tracks sourcemap transformation of its plugins if they return a source map. Since the babel-plugin-relay alters the sourcecode also the source map of the transformation needs to be returned to vite for it to generate the correct sourcemaps of all transformations
@tmair
Copy link
Contributor Author

tmair commented Jan 20, 2023

@oscartbeaumont Is there anything I can do to get this fix into a release?

@oscartbeaumont oscartbeaumont merged commit ab4aaa2 into oscartbeaumont:main Dec 10, 2023
@oscartbeaumont
Copy link
Owner

Sorry for the major delay. I don't actively use this project anymore so maintenance is seldom.

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