Skip to content

Releases

Released version 1.0.8

Choose a tag to compare

@dg dg released this 27 Oct 01:19

✨ New Features

  • {asset} and {preload} now work anywhere in a template – inside an attribute, a <style> or a <script> they print just the properly escaped URL, so <style>.hero { background: url('{asset bg.jpg}') }</style> simply works. In <script> the escaper supplies the quotes itself, so write {asset foo} without them.
  • A mapper can be an existing service – write cloud: @s3mapper in the mapping section.
  • Audio, video and generic assets now carry crossorigin, which also means videos, sounds and other files from a Vite manifest resolve correctly (#8).
  • Support for PHP 8.6.

💥 Breaking Changes

  • FilesystemMapper no longer resolves a reference whose .. leads outside its base path; give such files a mapping of their own.
  • n:asset on a Vite entry point with dependencies now throws and points you to {asset}, which renders the entry together with its CSS and preloads.

🐛 Bug Fixes

  • A Vite JavaScript entry without dependencies (including .mjs) is rendered with type="module" (#5).
  • n:asset and n:class can be combined on the same element (#9).
  • The CSP nonce is read for every request, so it stays correct under long-running workers such as FrankenPHP.

🛡️ Robustness

  • Smaller edge cases now behave: a clear error for a Vite manifest missing an imported chunk, n:asset with width="auto" or height="50%", the duration of non-MP3 audio (now null), Helpers::createAssetFromUrl() with an explicit mimeType or the text/javascript type, and stricter validation of array references in Registry.

Released version 1.0.7

Choose a tag to compare

@dg dg released this 28 Mar 17:16
  • FontAsset: added crossorigin property

Released version 1.0.6

Choose a tag to compare

@dg dg released this 25 Feb 02:02

This release is all about code quality and tooling. PHPStan static analysis is now a mandatory part of the CI pipeline with nette/phpstan-rules, phpDoc types have been tightened across the board, and the codebase follows stricter coding standards.

Released version 1.0.5

Choose a tag to compare

@dg dg released this 22 Nov 19:17
  • support for PHP 8.5
  • NAssetNode: compatible with Latte 3.1

Released version 1.0.4

Choose a tag to compare

@dg dg released this 24 Jun 15:54
  • ViteMapper: supports sass & jsx on dev server

Released version 1.0.3

Choose a tag to compare

@dg dg released this 19 Jun 01:07
  • added support for nonce
  • simplified detection of dev server

Released version 1.0.0

Choose a tag to compare

@dg dg released this 22 May 06:15

Initial release