How to configure Preline UI javascript to work with Rails 7 esbuild Turbo

How to properly integrate Preline UI and their js into rails 7 esbuild turbo app?

I know that the issue is related to turbo:load, however I do not know how to address it.

So far I configured tailwind.config.js to include require('preline/plugin')

I also added import "preline" to app/javascript/application.js

And with standard turbo drive it works

However with turbo-frames it does not

Anyone has any experience with it?

Here is their basic doc about installation

which preline version you use? currently, preline 2 or latest are broken

so if you want to use it, you have to specify the pkg version below v2

ok i found a solution here

but regarding versions of preline, do you mean that in version 1.9 everything works properly with turbo out of the box?

And another issue is, could anyone explain it to me if for instance initializing those preline components at every turbo:load could in any way impact the response time of our app?