mage-obsidian

The MageObsidian JS build engine for Magento 2 frontends: theme inheritance resolution, precompilation and JS interceptors for Vite builds.
4,758 1
Install
npm install mage-obsidian
Latest Version:4.1.2
License:MIT
Last Updated:Oct 15, 2026
Links: GitHub  ·  npm
Maintainer: jjuarez-dev

Development happens in mage-obsidian/framework. This package is published to npm from there; this repository is a read-only copy. Open issues and pull requests there.

mage-obsidian — JS Build Engine

npm version CI License

Star MageObsidian

📚 Documentation · 🚀 Live demo · 💬 Discussions

The JavaScript build engine behind MageObsidian, a modern frontend for Magento 2. ESM-only, consumed by the Vite harness as the mage-obsidian npm package.

What it does

  • Theme inheritance resolution — merges module web assets with theme and parent-theme overrides into the final set of JS/Vue/CSS entries, Magento-style.
  • Precompilation — generates per-theme precompiled.js / precompiled.css consumed as Vite inputs.
  • JS interceptors — a port of Magento's plugin system (before/around/after, sortOrder) implemented as a Vite plugin with virtual modules, so a module can customize another module's JS without patching its source.
  • mage-obsidian:build-themes — the CLI that reads the config contract generated by the PHP side and runs vite build / dev server per theme.

Usage

You normally don't install this package directly — it comes with the Vite harness:

composer require mage-obsidian/component-modern-frontend
pnpm --prefix vite install

See the documentation for theme/module configuration (theme.config.js, module.config.ts, interceptors and more).

Development

npm test    # Jest with native ESM

Support the project

If MageObsidian saves you time, consider buying me a coffee. ❤️

Related Packages

tailwindcss-themeable

multiple themes support for tailwindcss, with Dracula built-in

7,097 59
@skewedaspect/nuxt-ui-sleekspace

Restyles Nuxt UI v4 with the SleekSpace design system: beveled corners, OKLCH ra...

2,329
@nodefony/frontend

Construction et rechargement à chaud des frontends de chaque module Nodefony — V...

2,139 0
@microclear/label-image

Pure frontend JS library with Vue 3 demo and Vite build.

1,965
@bopli/theme-cli

Create, validate, type, build, package, and locally preview independently deploy...

1,912 0

Version History

Version Released License
4.1.2 MIT
4.1.1 MIT
4.1.0 MIT
4.0.2 MIT
4.0.1 MIT