Importing a js lib via Async Alpine
I'm loading an Alpine component asynchronously, however now my lib import doesn't work anymore:
Gives me this error:
Now tossing in the full relative path import Tribute from
"../../../../node_modules/tributejs/dist/tribute.esm.js";
also doesn't work since its loaded via http, so it'd try to load this: https://my-app.test/node_modules/tributejs/dist/tribute.esm.js which obviously wouldnt work. Do I need to somehow compile this tributejs into public for this to work with async alpine?0 Replies