Replies: 1 comment 2 replies
-
Try loading app.js first. The functions need to be available before Alpine attempts to render them. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there a way to bundle Alpine and Spruce together with my other vendor scripts, apart from my application script?
Currently I'm using Webpack, and I have tried to do the following:
Loading the scripts in the head:
But when I try to use a component or the Spruce store, I get errors stating the component or the store is undefined.
When I import Alpine and Spruce inside my
app.js
everything works fine, but I'd like to separate my application script from the vendor scripts so that the user doesn't have to download Alpine and Spruce every time my application script changes.Beta Was this translation helpful? Give feedback.
All reactions