Home / Function/ getSourceMapUrl() — vite Function Reference

getSourceMapUrl() — vite Function Reference

Architecture documentation for the getSourceMapUrl() function in worker-sourcemap-inline.spec.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  5267cd57_9f33_7623_aa31_991ed6452de9["getSourceMapUrl()"]
  be7d2baa_9d57_36e1_af46_f6c8fe574907["worker-sourcemap-inline.spec.ts"]
  5267cd57_9f33_7623_aa31_991ed6452de9 -->|defined in| be7d2baa_9d57_36e1_af46_f6c8fe574907
  style 5267cd57_9f33_7623_aa31_991ed6452de9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

playground/worker/__tests__/sourcemap-inline/worker-sourcemap-inline.spec.ts lines 99–107

function getSourceMapUrl(code: string): string {
  const regex = /\/\/[#@]\ssource(?:Mapping)?URL=\s*(\S+)/
  const results = regex.exec(code)

  if (results && results.length >= 2) {
    return results[1]
  }
  return null
}

Domain

Subdomains

Frequently Asked Questions

What does getSourceMapUrl() do?
getSourceMapUrl() is a function in the vite codebase, defined in playground/worker/__tests__/sourcemap-inline/worker-sourcemap-inline.spec.ts.
Where is getSourceMapUrl() defined?
getSourceMapUrl() is defined in playground/worker/__tests__/sourcemap-inline/worker-sourcemap-inline.spec.ts at line 99.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free