jeffreyguenther / vue-turbolinks

A Vue mixin to fix Turbolinks caching
MIT License
287 stars 20 forks source link

Issue with Vue Turbolinks and Laravel Spark Install #23

Closed jhull closed 4 years ago

jhull commented 6 years ago

Sry if this isn't the place to post this, but I can't find anyone with same problem.

Fresh install of latest Laravel w/ Spark. Everything works great if app.js is in <body>, but the moment I move to suggested '` everything stops working.

If I put it before Spark scripts in head, I get Spark not defined error. If I put at the end of <head> I get Vue not defined.

Would love to get all of these playing nice together.

tallredmanxyz commented 6 years ago

I'm also having this issue and currently investigating. Did you find any workarounds?

azimidev commented 5 years ago

Found it:

In your spark-bootstrap file, you have this condition:

if ($('#spark-app').length > 0) {
    require('vue-bootstrap');
}

just remove the if condition because it checks in the dom with jQuery to see if we have element with ID of spark-app.