Skip to content

v0.4.1

Choose a tag to compare

@furkanural furkanural released this 06 Mar 09:40
· 29 commits to main since this release
ca28c03

What's Fixed

Hot reload CSS loss (mix sayfa.serve)

After a file change triggered a hot rebuild, CSS would become inaccessible until the dev server was restarted. The root cause: digest_assets renamed main.cssmain.abc123.css, but on the next rebuild copy_theme_assets wrote a fresh main.css. Now both files existed, and the next digest_assets pass would rename the old fingerprinted file again (main.abc123.cssmain.abc123.abc123.css), invalidating the URL that the HTML was pointing to.

Fix: mix sayfa.serve now passes fingerprint: false to the builder. Fingerprinting is a production concern (long-lived CDN caches); in dev mode location.reload() already handles freshness.

Accumulated fingerprinted files on repeated mix sayfa.build

Each production rebuild left the previous *.hash.css / *.hash.js files behind in dist/assets/. Over time these accumulated and could cause rewrite_asset_references to produce incorrect URLs.

Fix: digest_assets now reads the previous manifest.json and deletes all previously fingerprinted files before rescanning, so only the freshly compiled assets are processed.

What's New

  • :fingerprint build option — Pass fingerprint: false to Sayfa.Builder.build/1 to skip asset digesting (useful for custom dev tooling). Defaults to true.

Upgrading

No breaking changes. Drop-in replacement for v0.4.0.

{:sayfa, "~> 0.4"}