transformZooWithSourcemapPlugin() — vite Function Reference
Architecture documentation for the transformZooWithSourcemapPlugin() function in zoo-with-sourcemap-plugin.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 24bf9ea4_a3d2_700a_83c0_f491e4719b27["transformZooWithSourcemapPlugin()"] a82ebd23_6b79_17ae_d2be_bc45ae15984b["zoo-with-sourcemap-plugin.ts"] 24bf9ea4_a3d2_700a_83c0_f491e4719b27 -->|defined in| a82ebd23_6b79_17ae_d2be_bc45ae15984b style 24bf9ea4_a3d2_700a_83c0_f491e4719b27 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
playground/js-sourcemap/zoo-with-sourcemap-plugin.ts lines 4–18
export const transformZooWithSourcemapPlugin: () => Plugin = () => ({
name: 'sourcemap',
transform(code, id) {
if (id.includes('zoo.js')) {
const ms = new MagicString(code)
ms.append('// add comment')
return {
code: ms.toString(),
// NOTE: MagicString without `filename` option generates
// a sourcemap with `sources: ['']` or `sources: [null]`
map: ms.generateMap({ hires: true }),
}
}
},
})
Domain
Subdomains
Source
Frequently Asked Questions
What does transformZooWithSourcemapPlugin() do?
transformZooWithSourcemapPlugin() is a function in the vite codebase, defined in playground/js-sourcemap/zoo-with-sourcemap-plugin.ts.
Where is transformZooWithSourcemapPlugin() defined?
transformZooWithSourcemapPlugin() is defined in playground/js-sourcemap/zoo-with-sourcemap-plugin.ts at line 4.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free