javascriptsymfonywebpacktailwind-csstailwind-elements

Tailwind-Elements to work with webpack encore defer attribute false


My projects is running with Symfony 5.4 and uses Webpack Encore Bundle. I added Tailwind to it, no problem with that.

When I added Tailwind-Elements (TE) which adds some JS I had the following issue:

I can't set it to true because some other components (such as jQuery) don't work if defer set to true.

Any help would be much appreciated!


Solution

  • Finally managed to make it work!

    By default, only one js entrypoint is set (app.js). The solution for me was to:

    And that's it!