⚠️ Attention ⚠️ - Please update to v0.117 to fix known bugs. See #791 and #789 and #818.
What's Changed
Fix
-
Fix the order of execution of JS scripts:
- Scripts in
Component.Media.js
are executed in the order they are defined - Scripts in
Component.js
are executed AFTERMedia.js
scripts
- Scripts in
-
Fix compatibility with AlpineJS
- Scripts in
Component.Media.js
are now again inserted as<script>
tags - By default,
Component.Media.js
are inserted as synchronous<script>
tags,
so the AlpineJS components registered in theMedia.js
scripts will now again
run BEFORE the core AlpineJS script.
AlpineJS can be configured like so:
Option 1 - AlpineJS loaded in
<head>
withdefer
attribute:<html> <head> {% component_css_dependencies %} <script defer src="https://unpkg.com/alpinejs"></script> </head> <body> {% component 'my_alpine_component' / %} {% component_js_dependencies %} </body> </html>
Option 2 - AlpineJS loaded in
<body>
AFTER{% component_js_depenencies %}
:<html> <head> {% component_css_dependencies %} </head> <body> {% component 'my_alpine_component' / %} {% component_js_dependencies %} <script src="https://unpkg.com/alpinejs"></script> </body> </html>
- Scripts in
Full Changelog: 0.115...0.116