MCPcopy
hub / github.com/vitejs/vite / getContentWithSourcemap

Function getContentWithSourcemap

packages/vite/src/node/plugins/css.ts:575–588  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

573
574 if (config.command === 'serve') {
575 const getContentWithSourcemap = async (content: string) => {
576 if (config.css.devSourcemap) {
577 const sourcemap = this.getCombinedSourcemap()
578 if (sourcemap.mappings) {
579 await injectSourcesContent(
580 sourcemap,
581 cleanUrl(id),
582 config.logger,
583 )
584 }
585 return getCodeWithSourcemap('css', content, sourcemap)
586 }
587 return content
588 }
589
590 if (isDirectCSSRequest(id)) {
591 return null

Callers 1

handlerFunction · 0.85

Calls 4

injectSourcesContentFunction · 0.90
cleanUrlFunction · 0.90
getCodeWithSourcemapFunction · 0.90
getCombinedSourcemapMethod · 0.80

Tested by

no test coverage detected