Releases: symfony/webpack-encore-bundle
Simpler syntax for stimulus_controller()
Hi Webpackers!
A short time ago, v1.10.0 was released with a new stimulus_controller()
Twig function. This release makes it simpler to use that with only 1 controller:
<!-- new syntax -->
{{ stimulus_controller('chart', { 'name': 'Likes', 'data': [1, 2, 3, 4] }) }}
<!-- existing, longer syntax (still works) -->
{{ stimulus_controller({ 'chart': { 'name': 'Likes', 'data': [1, 2, 3, 4] } }) }}
See #110 for more details.
Diff: v1.10.0...v1.11.0
Happy packing!
New stimulus_controller() Twig function!
Hi Webpackers!
If you've been following the Symfony UX initiative, then this release is for you!
- Added a new
stimulus_controller()
Twig function to help render Stimulus controllers - #109 thanks to @tgalopin
Diff: v1.9.0...v1.10.0
Happy packing!
Adding 3 ways to control link/script attributes
Hi Webpackers!
This release contains a long-asked-for feature: the ability to control the attributes on the script
and link
tags generated by this bundle. There are 3 ways to control them: (A) globally via config, (B) when using the Twig functions or (C) via an event listener. See the docs for more details: https://github.com/symfony/webpack-encore-bundle#custom-attributes-on-script-and-link-tags
Diff: v1.8.0...v1.9.0
Happy packing!
Allowing PHP 8
Bug fix: missing CSS/JS after some exceptions
Hi friends!
This release contains a single bug fix for a tricky issue: you render a Twig template (which uses the encore_entry_link_tags()
and encore_entry_script_tags()
functions) and then an exception (for some reason) is thrown, Symfony would correctly render your error template BUT any calls to encore_entry_link_tags()
in that template would render no link/script tags because they were "already rendered". This is due to an important feature in WebpackEncoreBundle where any link or script tag is never rendered multiple times... to avoid having the same JS or CSS file rendered on the same page multiple times.
However, in the case of an exception that's thrown in Twig, WebpackEncoreBundle would think that a JS or CSS file had been rendered, but in reality, the HTML it was rendered into was never used - because the exception caused that HTML to not be used and for the "error" page to be used instead.
This was fixed in #74 thanks to @tbmatuka and @ckrack by adding an exception listener that "resets" this bundle's "memory" of what it has rendered.
If you experience any adverse effects, please open an issue :).
Happy packing!
Fix Symfony 4.4 & 5 support with WebLink & preload
Hi Webpackers!
This fixes a compatibility issue with Symfony 4.4 & 5.0 when using the preload: true
option. See #84.
Happy packing!
Support for Symfony 5
Hi friends!
Symfony 5 won't be out until the end of November, but this bundle is now ready for it!
Happy packing!
1.6.2 Update to symfony/service-contracts
A tiny release, but one that fixes an annoying bug with the composer autoloader.
#65 - [Contracts] Update dependency to use symfony/service-contracts - thanks to @wbrinkman
Happy Webpacking!
Missing kernel.reset tags & default build
New preload option & strict_mode options
Woo! Another release - this time with two small, but nice features!
-
Automatically add http2 preload Link headers to all assets thanks to the
preload
option - #61 thanks to @weaverryan -
New
strict_mode
option to avoid throwing an exception for missingentrypoints.json
or keys inside - #54 thanks to @karser
Have fun!