Repository navigation
fix(build): return maps from dependency compatibility transforms - #713
Conversation
🤖 MERGED
GitHub merged this pull request.
f14ef3e6-6c7a-4cfc-abb6-68fab3217048 Selected findings run after merge and open separate pull requests. |
There was a problem hiding this comment.
Harlan Agent Kit posted this automated review. AI open source policy.
Automated Review: READY.
Optional follow-ups
Minor (50/100) · An empty OG image plugin module now aborts the build transform.
For either recognized OG image module ID, empty source reaches overwrite(0, 0, wrapper). The pinned MagicString 1.2.3 implementation delegates overwrite to update, which throws when start equals end. The base returned the same valid wrapper regardless of the input source, so an empty input now aborts the transform.
Optional follow-up: As an optional follow-up, use an insertion for empty source and keep the existing overwrite for nonempty source.
Trivial (18/100) · The Vite hook allocates source-map editing state for modules it leaves unchanged.
Nuxt registers this as an unfiltered Vite transform. Each unrelated module now allocates a MagicString instance, a chunk, two maps, and a bit set before returning null. The base performed only the path checks for that case.
Optional follow-up: As an optional follow-up, return null for unmatched module IDs before constructing MagicString.
| : undefined | ||
|
|
||
| const transformed = new MagicString(code) | ||
| if (ogImageExport) { |
There was a problem hiding this comment.
Logged (50/100): An empty OG image plugin module now aborts the build transform.
Proof: For either recognized OG image module ID, empty source reaches overwrite(0, 0, wrapper). The pinned MagicString 1.2.3 implementation delegates overwrite to update, which throws when start equals end. The base returned the same valid wrapper regardless of the input source, so an empty input now aborts the transform.
Optional follow-up: As an optional follow-up, use an insertion for empty source and keep the existing overwrite for nonempty source.
- Ask an agent to verify and fix this finding
Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy.
| const ogImageExport = fileName && sourcePath.includes('/nuxt-og-image/dist/runtime/app/plugins/') | ||
| ? OG_IMAGE_PLUGINS.get(fileName) | ||
| : undefined | ||
|
|
There was a problem hiding this comment.
Logged (18/100): The Vite hook allocates source-map editing state for modules it leaves unchanged.
Proof: Nuxt registers this as an unfiltered Vite transform. Each unrelated module now allocates a MagicString instance, a chunk, two maps, and a bit set before returning null. The base performed only the path checks for that case.
Optional follow-up: As an optional follow-up, return null for unmatched module IDs before constructing MagicString.
- Ask an agent to verify and fix this finding
Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy.
🔗 Linked issue
Closes #712
❓ Type of change
📚 Description
Issue #712 reports
[SOURCEMAP_BROKEN]becauseskilld:dependency-plugin-compatmodified source without returning a map. Both rewrite paths now return source maps with original content, preserving mappings around the page export rewrite. The authenticated production build remains the confirmation point for the warning's removal.