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 May 7, 2024 via pnpm

vue-template-compiler 2.7.14

template compiler for Vue 2.0
Package summary
Share
0
issues
1
license
3
MIT
Package created
10 Jun 2016
Version published
9 Nov 2022
Maintainers
2
Total deps
3
Direct deps
2
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
3 Packages, Including:
de-indent@1.0.2
he@1.2.0
vue-template-compiler@2.7.14
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

2
All Dependencies CSV
β“˜ This is a list of vue-template-compiler 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
de-indent1.0.21.04 kBMIT
prod
he1.2.039.33 kBMIT
prod

Visualizations

Frequently Asked Questions

What does vue-template-compiler do?

The vue-template-compiler is a powerful tool in the Vue ecosystem that pre-compiles Vue 2.0 templates into render functions. Its main objective is to avoid overhead associated with runtime-compilation and to circumvent Content Security Policy restrictions. Its use can result in more efficient code execution and enhanced application performance. Though it is commonly used along with vue-loader, there are special cases where the vue-template-compiler needs to be used separately, particularly when it pertains to building tools with very specific requirements.

How do you use vue-template-compiler?

The vue-template-compiler is used as an npm package and can be installed with the command npm install vue-template-compiler. After installation, it can be required in your JavaScript code as follows:

const compiler = require('vue-template-compiler')

A simple example of using the compile function provided by the compiler could be:

const { render } = compiler.compile('<div>{{ msg }}</div>')
console.log(render)
// => "with(this){return _c('div',[_v(_s(msg))])}"

The compile function takes two parameters: a template string and an optional options object. The returned result is an object that includes the render function code, template syntax errors (if any), render code for static subtrees, and parsed template elements to Abstract Syntax Tree (AST).

Where are the vue-template-compiler docs?

Vue-template-compiler documentation can be found within the official Vue.js GitHub repository. The documentation is comprehensive and provides insights into how to effectively use the package in your Vue applications. It gives detailed descriptions of API functions, their parameters, return values and examples of how to use the functions. You may refer to it at https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler.