Skip to content

fix(sourcemap): improve sourcemap compatibility for vue2#16594

Merged
patak-cat merged 2 commits into
vitejs:mainfrom
amweiss:vue2-sourcemaps-compat
May 5, 2024
Merged

fix(sourcemap): improve sourcemap compatibility for vue2#16594
patak-cat merged 2 commits into
vitejs:mainfrom
amweiss:vue2-sourcemaps-compat

Conversation

@amweiss

@amweiss amweiss commented May 4, 2024

Copy link
Copy Markdown
Contributor

Description

This change does match what was in #16192 but that is marked as not resolving a different problem, so I didn't want to conflate things.

Thile using vue2, and specifically the vue2-google-maps package which contains a vue component, the build process produces a resolvedSourcePath that contains query string style arguements such as:

/home/adam/repos/vue2-map/node_modules/node_modules/.pnpm/vue2-google-maps@0.10.7/node_modules/vue2-google-maps/dist/components/placeInputImpl.js?v=c006e476&vue&type=script&src=true&lang.js

This then leads to a missingSources entry since the characters after the extension do not allow for the file to be loaded such as:

Sourcemap for "/home/adam/repos/vue2-map/node_modules/.pnpm/vue2-google-maps@0.10.7/node_modules/vue2-google-maps/dist/components/placeInputImpl.js" points to missing source files

By first converting the URI to a filesystem path, we can ensure it loads the file.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat: sourcemap Sourcemap support p2-edge-case Bug, but has workaround or limited in scope (priority)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants