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

CSF-plugin: Fix sourcemaps #21704

Merged
merged 3 commits into from
Mar 22, 2023
Merged

CSF-plugin: Fix sourcemaps #21704

merged 3 commits into from
Mar 22, 2023

Conversation

shilman
Copy link
Member

@shilman shilman commented Mar 21, 2023

Closes N/A

What I did

Added sourcemap support for CSF-plugin using Babel's built in sourcemap support.

How to test

In a Vite project before the fix, it will output the following warnings:

the transformation. Consult the plugin documentation for help
rendering chunks (108)...Sourcemap is likely to be incorrect: a plugin (unplugin-csf) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help
rendering chunks (114)...Sourcemap is likely to be incorrect: a plugin (unplugin-csf) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help

After the change, the warnings go away.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@shilman shilman requested a review from IanVS March 21, 2023 00:33
Copy link
Member

@IanVS IanVS left a comment

Choose a reason for hiding this comment

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

It looks like there are some failing CI checks, but otherwise this looks good and indeed solves the missing sourcemap issue in my project.

@shilman shilman merged commit 60b7684 into next Mar 22, 2023
@shilman shilman deleted the shilman/csf-plugin-sourcemaps branch March 22, 2023 16:52
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.

None yet

2 participants