Pre-compiles Kdu 2.0 templates into render functions to avoid runtime compilation overhead and support CSP restrictions. v2.7.16 is the latest stable release. The package is auto-generated from the main Kdu repo. Compiles templates to JavaScript code with `with` statements, not compatible with strict mode. Provides `compile` and `compileToFunctions` methods. Unlike the full build, this allows compile-time optimization and directive transformations. Deprecated `preserveWhitespace` option (use `whitespace` instead). Ships TypeScript types.
npm install kdu-template-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to require the package, use compile() to get render function string, and compileToFunctions() to get instantiated functions.
Replace `preserveWhitespace` with `whitespace: 'preserve'` or `whitespace: 'condense'`.
Use the runtime-only build of Kdu with pre-compiled render functions, or use `kdu-loader` which handles compilation.
Use `require()` or ensure your bundler handles CJS packages.
Use @kdujs/compiler-sfc for Kdu 3 template compilation.
Run `npm install kdu-template-compiler` and use `const compiler = require('kdu-template-compiler')`.Use `const { compile } = require('kdu-template-compiler')` or `const compiler = require('kdu-template-compiler')` then `compiler.compile()`.Pre-compile templates with Kdu SFC loader (e.g., kdu-loader) or use the runtime-only build of Kdu.
No dependency data recorded yet.