Repository navigation
Releases
Releases · nette/assets
Released version 1.0.8
✨ 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: @s3mapperin themappingsection. - 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 withtype="module"(#5). n:assetandn:classcan 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:assetwithwidth="auto"orheight="50%", the duration of non-MP3 audio (nownull),Helpers::createAssetFromUrl()with an explicitmimeTypeor thetext/javascripttype, and stricter validation of array references inRegistry.
Released version 1.0.7
- FontAsset: added crossorigin property
Released version 1.0.6
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
- support for PHP 8.5
- NAssetNode: compatible with Latte 3.1
Released version 1.0.4
- ViteMapper: supports sass & jsx on dev server
Released version 1.0.3
- added support for nonce
- simplified detection of dev server