Alpine.js 3.15.12
Alpine.js 3.15.12 ships today as a maintenance release focused on CSP compatibility, crash fixes, and build output improvements. This update touches the core evaluator, two directives, and the packaging layer.
CSP Evaluator Fixes
Two fixes land in the CSP evaluator mode. Member expression assignments — patterns like obj.prop = value — are now properly supported inside CSP-restricted pages. Additionally, the && and || operators now short-circuit correctly in CSP evaluator mode, matching standard JavaScript behaviour. Both changes close long-standing inconsistencies that caused unexpected evaluations in secure contexts.
Directive Crash Fixes
The x-for directive was crashing on objects with a null prototype — notably the results of Object.groupBy(). This has been resolved so iterable grouped data works seamlessly. The x-sort directive also received a stability fix: it no longer crashes when the container holds a <template> element that lacks a .content property.
x-Anchor Enhancement
A new .fixed positioning modifier has been added to the x-anchor plugin, giving developers explicit control over fixed-position anchoring behaviour. This is opt-in and preserves backward compatibility.
Build & Packaging
Minified ESM build outputs are now shipped for every Alpine.js package, reducing bundle sizes for production deployments that consume the ESM format directly.
Other Fixes
- x-id: Evaluation order fixed so
$idresolves consistently when used insidex-datablocks - @teleport: Detached DOM nodes are no longer leaked on every Livewire render cycle