📚 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.
- 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.cssconsumed 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 runsvite build/ dev server per theme.
You normally don't install this package directly — it comes with the Vite harness:
composer require mage-obsidian/component-modern-frontend
pnpm --prefix vite installSee the documentation for theme/module configuration (theme.config.js, module.config.ts, interceptors and more).
npm test # Jest with native ESMIf MageObsidian saves you time, consider buying me a coffee. ❤️