Skip to content

Installation

Morphic Blocks bundles Blockly as a dependency, so it is installed for you:

Terminal window
npm install morphic-blocks

The code editor, codespace, and preview views are built on CodeMirror 6. The CodeMirror packages are optional peer dependencies — install them only if you use those views:

Terminal window
npm install @codemirror/state @codemirror/view @codemirror/lang-javascript

They are loaded lazily: a project that never mounts a code editor never pays for them.

  • A bundler-based setup (Vite, or anything that resolves modern ESM). The library ships ES modules plus TypeScript declarations.
  • TypeScript is recommended — the public API is fully typed — but not required.

Next: the Quick Start.