Home / Function/ scss() — vue Function Reference

scss() — vue Function Reference

Architecture documentation for the scss() function in stylePreprocessors.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  6cf247ba_adb6_78e1_b2b4_a3064dc83a15["scss()"]
  496757ba_5cd7_a57b_2bda_c9d4086a452e["stylePreprocessors.ts"]
  6cf247ba_adb6_78e1_b2b4_a3064dc83a15 -->|defined in| 496757ba_5cd7_a57b_2bda_c9d4086a452e
  238fe750_78ec_5d7c_a1c3_7d2a6295b29c["sass()"]
  238fe750_78ec_5d7c_a1c3_7d2a6295b29c -->|calls| 6cf247ba_adb6_78e1_b2b4_a3064dc83a15
  7d1469f1_3d4c_d17c_83f1_6907025dc277["getSource()"]
  6cf247ba_adb6_78e1_b2b4_a3064dc83a15 -->|calls| 7d1469f1_3d4c_d17c_83f1_6907025dc277
  style 6cf247ba_adb6_78e1_b2b4_a3064dc83a15 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/compiler-sfc/src/stylePreprocessors.ts lines 23–49

const scss: StylePreprocessor = (source, map, options) => {
  const nodeSass = require('sass')
  const finalOptions = {
    ...options,
    data: getSource(source, options.filename, options.additionalData),
    file: options.filename,
    outFile: options.filename,
    sourceMap: !!map
  }

  try {
    const result = nodeSass.renderSync(finalOptions)
    const dependencies = result.stats.includedFiles
    if (map) {
      return {
        code: result.css.toString(),
        map: merge(map, JSON.parse(result.map.toString())),
        errors: [],
        dependencies
      }
    }

    return { code: result.css.toString(), errors: [], dependencies }
  } catch (e: any) {
    return { code: '', errors: [e], dependencies: [] }
  }
}

Domain

Subdomains

Calls

Called By

Frequently Asked Questions

What does scss() do?
scss() is a function in the vue codebase, defined in packages/compiler-sfc/src/stylePreprocessors.ts.
Where is scss() defined?
scss() is defined in packages/compiler-sfc/src/stylePreprocessors.ts at line 23.
What does scss() call?
scss() calls 1 function(s): getSource.
What calls scss()?
scss() is called by 1 function(s): sass.

Analyze Your Own Codebase

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

Try Supermodel Free