Vue 2.0 template compiler that pre-compiles Vue templates into render functions, avoiding runtime compilation and CSP restrictions. Version 2.0.6 is the current stable release for Vue 2.x, maintained by the Vue core team. Use cases include build tools like vue-loader and vueify. Differentiator: provides AST access and compile-time options (custom modules/directives) unlike higher-level tools. Note: Not needed for most users; use vue-loader or vueify instead.
npm install vip-template-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of compile() and compileToFunctions() methods.
Either avoid strict mode or use compileToFunctions which returns a function usable in strict mode (but uses new Function() and is not CSP-compliant).
Use compile() output (string) with a CSP-compliant eval strategy, or pre-compile via build tools.
Use `import { compile } from 'vue-template-compiler'` with @types/vue installed.Migrate to @vue/compiler-sfc for Vue 3.
Install via `npm install vue-template-compiler` and use with Node.js or a bundler (Webpack/Rollup).
Use compileToFunctions() instead, which returns a function without 'with' statement.
Use `const { compileToFunctions } = require('vue-template-compiler')`.