Build/bundler usage (ESM/CJS)

If you bundle VSN.js, import the Engine directly and mount manually.

ESM

import { Engine } from "vsn";

CJS

const { Engine } = require("vsn");

Bundler notes

  • Tree shaking works best with ESM.
  • Keep your CFS source as a string and call registerBehaviors.
  • If you want to keep it simple, use the CDN instead.

CDN fallback

You can still use auto-mount in a bundled app for quick demos.