Alpine.js 3.17.5
Alpine.js 3.17.5 shipped on October 20, 2026. It is a one-line patch with a single fix, and yet it is the release I would actually put in front of a team, because the 3.17 line it closes out has quietly reshaped how Alpine handles initialization order and CSP restrictions.
I maintain a few Alpine front ends: a marketing site, an admin panel, and a Livewire-backed dashboard. I moved the dashboard to 3.17.5 the day it landed and pulled the other two along a week later. Nothing broke. A couple of ugly workarounds became unnecessary.
What 3.17.5 actually changes
The 3.17.5 change is narrow. Alpine was re-applying x-cloak to elements it had already rendered during a morph. In practice that meant a flash of hidden markup after a Livewire or Turbo update, region-dependent and annoying to reproduce. The fix stops the re-application, and the post-morph flicker goes away.
If you never use morphing, this patch is invisible to you. If you do, it removes a bug you probably blamed on your own CSS.
The features that landed earlier in the line
Most of the substance in 3.17.x arrived between August 30 and mid-September. Taken together, it is a more interesting release than the version number suggests.
Alpine.deferInit()(3.17.0) lets you suspend a component tree until an async prerequisite settles. This is the answer to the old "hide the whole app behindx-cloakand hope" pattern. You can now defer initialization until a session fetch or feature flag resolves, then let Alpine hydrate the tree.- Sandboxed iframe CSP fix (3.17.2) makes CSP initialization work inside sandboxed frames, which previously needed a custom build.
x-forloop syntax (3.17.3) now accepts forms like(foo)in(bar). Small, but it removes a class of parser surprises when expressions are generated by templating engines.- CSP parser (3.17.3) accepts reserved words as property names, method names, and object keys, so CSP builds stop failing on expressions that plain Alpine handles fine.
- Lifecycle correctness (3.17.3):
$watchandx-modelableno longer fire after being unwatched or released, andx-datainit()is skipped during clone, matchingx-initbehavior. - Resize plugin viewport modifier (3.17.4) is the one I use most. Instead of watching the element box, you can watch the viewport, which is what you actually want for responsive breakpoint logic.
- Mutation observer recovery (3.17.4) means a thrown error no longer leaves the observer dead for the rest of the session.
A migration note on deferInit
The deferInit pattern is tempting enough to overuse. My rule after a month with it: defer only when you have a genuine async dependency, and keep the deferred subtree small. A whole-page defer trades a flash of unstyled markup for a flash of empty markup, which is not obviously better.
Two things to watch when adopting it:
- Directives inside the deferred subtree do not evaluate until initialization is released, so anything expected to run immediately needs to sit outside it.
- Server-rendered content still ships in the HTML, so
x-cloakremains useful for the pre-init state. deferInit complements it rather than replacing it.
Upgrading
The upgrade is a single dependency bump, whether you load Alpine from a script tag or through a bundler:
- Update the CDN tag to
3.17.5, or runnpm install [email protected]. - Rebuild any custom CSP bundle, since the parser changed within the line.
- If you use morphing with Livewire or Turbo, re-test the transitions you previously worked around with CSS.
- If you use the resize plugin for breakpoints, check whether the new
viewportmodifier fits your use case better than element sizing.
Alpine 3.17.5 is available now on npm and jsDelivr. No breaking changes, no new deprecations, and for morph users, one fewer reason to write a CSS hack.