Pre-compiles Vue 2.0 templates into render functions to avoid runtime compilation overhead and CSP restrictions. Current stable version is 2.7.16, the final Vue 2 release (EOL December 31, 2023). This package is auto-generated from Vue core; for most cases use vue-loader or vueify instead. It supports custom compile-time modules and directives, SFC parsing, and provides compile() and compileToFunctions() APIs. The returned render function uses 'with' and cannot be used in strict mode. Key differentiator: low-level compiler for build tools, distinct from runtime-only Vue builds.
npm install touchui-template-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Compiles a Vue 2 template string to render functions and parses a .vue SFC file.
Migrate to Vue 3 and use @vue/compiler-sfc.
Use compileToFunctions() which returns Function objects, or wrap render code in a non-strict function.
Use pre-compiled render functions via compile() if CSP is required.
Avoid custom compile modules; use standard build tools.
Use named import: import { compile } from 'vue-template-compiler'Wrap render function in a non-strict function or use compileToFunctions()
Run npm install vue-template-compiler
No dependency data recorded yet.