Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on Feb 28, 2024 via pnpm

@vue/compiler-sfc 3.3.4

@vue/compiler-sfc
Package summary
Share
0
issues
3
licenses
16
MIT
1
ISC
1
BSD-3-Clause
Package created
20 Dec 2019
Version published
18 May 2023
Maintainers
2
Total deps
18
Direct deps
10
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
16 Packages, Including:
@babel/helper-string-parser@7.23.4
@babel/helper-validator-identifier@7.22.20
@babel/parser@7.24.0
@babel/types@7.24.0
@jridgewell/sourcemap-codec@1.4.15
@vue/compiler-core@3.3.4
@vue/compiler-dom@3.3.4
@vue/compiler-sfc@3.3.4
@vue/compiler-ssr@3.3.4
@vue/reactivity-transform@3.3.4
@vue/shared@3.3.4
estree-walker@2.0.2
magic-string@0.30.7
nanoid@3.3.7
postcss@8.4.35
to-fast-properties@2.0.0

ISC License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
picocolors@1.0.0

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
source-map-js@1.0.2
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

10
All Dependencies CSV
β“˜ This is a list of @vue/compiler-sfc 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
@babel/parser7.24.01.8 MBMIT
prod
@vue/compiler-core3.3.4115.54 kBMIT
prod
@vue/compiler-dom3.3.4161.86 kBMIT
prod
@vue/compiler-ssr3.3.410.13 kBMIT
prod
@vue/reactivity-transform3.3.47.03 kBMIT
prod
@vue/shared3.3.412.36 kBMIT
prod
estree-walker2.0.28.16 kBMIT
prod
magic-string0.30.781.85 kBMIT
prod
postcss8.4.35193.05 kBMIT
prod
source-map-js1.0.237.16 kBBSD-3-Clause
prod

Visualizations

Frequently Asked Questions

What does @vue/compiler-sfc do?

The @vue/compiler-sfc package is a set of lower-level utilities for compiling Vue Single File Components (SFCs) into JavaScript. Its primary purpose is to facilitate the creation of plugins or transformations for a bundler or module system. Integral to several popular development tools, including vue-loader, rollup-plugin-vue and vite, @vue/compiler-sfc takes care of separate hot-module replacements for scripts, templates, and styles, each bearing unique considerations.

How do you use @vue/compiler-sfc?

In order to use @vue/compiler-sfc, you have to import it from the main Vue package. However, you are not required to explicitly install it, as it is included as a dependency of the main Vue package. The typical usage involves using various APIs to parse, compile, and manage the different parts of your Vue SFCs.

Here's a basic example:

// Importing the necessary functions from the @vue/compiler-sfc
import { parse, compileScript, compileTemplate, compileStyle } from 'vue/compiler-sfc'

// Defining the source code of a Vue SFC
const sourceCode = '...'

// Parsing the SFC into a descriptor
const descriptor = parse(sourceCode)

// Compiling the different parts of the SFC
const script = compileScript(descriptor)
const template = compileTemplate(descriptor)
const style = compileStyle(descriptor)

// Now `script`, `template` and `style` hold the compiled code and other useful information

Kindly note that the sourceCode string should hold the actual text content of a .vue file.

Where are the @vue/compiler-sfc docs?

The documentation for @vue/compiler-sfc is embedded in the source code as TypeScript type definitions. For more practical guidance on how to use the APIs available in @vue/compiler-sfc, developers can refer to the source code of rollup-plugin-vue or vue-loader. The explanation of the high-level workflow in the readme also provides valuable directions on using the package effectively.