Home / Function/ cleanScssBugUrl() — vite Function Reference

cleanScssBugUrl() — vite Function Reference

Architecture documentation for the cleanScssBugUrl() function in css.ts from the vite codebase.

Entity Profile

Dependency Diagram

graph TD
  1479899a_5d18_ab3c_da35_d44505504960["cleanScssBugUrl()"]
  c3eb47df_971b_0616_6c9f_29b3ded72224["css.ts"]
  1479899a_5d18_ab3c_da35_d44505504960 -->|defined in| c3eb47df_971b_0616_6c9f_29b3ded72224
  788c7102_1f9e_48db_0312_d3566b067276["makeScssWorker()"]
  788c7102_1f9e_48db_0312_d3566b067276 -->|calls| 1479899a_5d18_ab3c_da35_d44505504960
  0a163673_dac2_220c_2b8a_a489f9a38632["scssProcessor()"]
  0a163673_dac2_220c_2b8a_a489f9a38632 -->|calls| 1479899a_5d18_ab3c_da35_d44505504960
  style 1479899a_5d18_ab3c_da35_d44505504960 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/vite/src/node/plugins/css.ts lines 2471–2483

function cleanScssBugUrl(url: string) {
  if (
    // check bug via `window` and `location` global
    typeof window !== 'undefined' &&
    typeof location !== 'undefined' &&
    typeof location.href === 'string'
  ) {
    const prefix = location.href.replace(/\/$/, '')
    return url.replace(prefix, '')
  } else {
    return url
  }
}

Domain

Subdomains

Frequently Asked Questions

What does cleanScssBugUrl() do?
cleanScssBugUrl() is a function in the vite codebase, defined in packages/vite/src/node/plugins/css.ts.
Where is cleanScssBugUrl() defined?
cleanScssBugUrl() is defined in packages/vite/src/node/plugins/css.ts at line 2471.
What calls cleanScssBugUrl()?
cleanScssBugUrl() is called by 2 function(s): makeScssWorker, scssProcessor.

Analyze Your Own Codebase

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

Try Supermodel Free