You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to combine Symfony's new AssetMapper with this library.
As the docs suggests I'm extending the layout-vertical.html.twig template.
In my page.html.twig I have the following:
{% extends'@Tabler/layout-vertical.html.twig' %}
{% blockpage_content %}
// yadda yadda
{% endblock %}
{% blockjavascripts %}
{{ parent() }} // So that tabler.js is loaded and we can open/close the mobile menu
{{ importmap('app') }} // Import our global JS, containing our libraries
<scripttype="module">import'{{ asset('dashboard.js') }}'; // Import our Dashboard.js on the page.html.twig. I do not want this code to be loaded on every page. </script>
{% endblock %}
This kinda works, because I can see the JS is loaded on my page.
If I visit a menu item (for example, the same page) I get the following console errors:
> An import map is added after module script load was triggered.
Also, all the javascript on the page is gone.
Maybe my understanding of AssetMapper isn't good enough or I'm doing something very wrong.
Could you guys point me to the right direction?
The text was updated successfully, but these errors were encountered:
I doubt its compatible, but the current version of the bundle is based on Webpack Encore.
If you find a solution and share it as PR, I am happy to incorporate it.
Hello all 👋,
I'm trying to combine Symfony's new AssetMapper with this library.
As the docs suggests I'm extending the
layout-vertical.html.twig
template.In my
page.html.twig
I have the following:This kinda works, because I can see the JS is loaded on my page.
If I visit a menu item (for example, the same page) I get the following console errors:
> An import map is added after module script load was triggered.
Also, all the javascript on the page is gone.
Maybe my understanding of AssetMapper isn't good enough or I'm doing something very wrong.
Could you guys point me to the right direction?
The text was updated successfully, but these errors were encountered: