Skip to content

fix(babel): Strip filename queries when injecting source maps#9576

Open
NiGhTTraX wants to merge 1 commit into
software-mansion:mainfrom
NiGhTTraX:fix/filename-querystring
Open

fix(babel): Strip filename queries when injecting source maps#9576
NiGhTTraX wants to merge 1 commit into
software-mansion:mainfrom
NiGhTTraX:fix/filename-querystring

Conversation

@NiGhTTraX

Copy link
Copy Markdown

Summary

Fixes #9575.

If the worklets Babel plugin runs in a Vite context, it may receive filenames with querystring suffixes, e.g. ?v=123, that will lead to ENOENT errors when attempting to read the file for sourcemap generation. A quick workaround is to disable sourcemaps with disableSourceMaps: true.

This PR cleans up the filenames by stripping ? and # suffixes, according to Vite's cleanUrl helper.

Test plan

I've included a test for this. A full repro repo can also be found at https://github.com/NiGhTTraX/sb-native-reanimated.

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.

babel plugin throws ENOENT for filenames with query suffixes e.g. from vite

1 participant