A single-file component compiler for Knockout.js, enabling Vue-like component authoring with <template>, <style scoped>, and <script> blocks. Version 0.5.0 is currently the latest and appears to be in early development with minimal release activity. Key differentiators: supports scoped styles, rollup integration via rollup-plugin-ko, and automatic component registration. Requires peer dependencies insert-css and robust-mixin.
npm install ko-component-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates compiling a single-file component using the ko-component-compiler compiler.compile() function.
Wrap callback in a Promise or promisify the function.
Install all required rollup plugins and peer dependencies as shown in README.
Ensure script block matches the expected ES module export pattern.
npm install insert-css
Use `import { compile } from 'ko-component-compiler'` or `const { compile } = require('ko-component-compiler')`Add rollup-plugin-babel with es2015-rollup preset as shown in README.