Installation
Morphic Blocks bundles Blockly as a dependency, so it is installed for you:
npm install morphic-blocksbun add morphic-blockspnpm add morphic-blocksOptional: code editor packages
Section titled “Optional: code editor packages”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:
npm install @codemirror/state @codemirror/view @codemirror/lang-javascriptbun add @codemirror/state @codemirror/view @codemirror/lang-javascriptpnpm add @codemirror/state @codemirror/view @codemirror/lang-javascriptThey are loaded lazily: a project that never mounts a code editor never pays for them.
Requirements
Section titled “Requirements”- 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.
© 2026 Leibniz University Hannover