How to use UMD Quasar in existing express site with requirejs? #14645
Replies: 2 comments 1 reply
-
What Vue are you loading? |
Beta Was this translation helpful? Give feedback.
-
Okay, so I think I may have found the issue. I don't really understand it all, but it looks like having jquery in the mix is causing problems. At the start of
To me it looks like this is trying to figure out where to get a reference to Vue from. Using The
So, the code tries to do If I comment out the checks and only leave the last part in, thus:
(And actually, I know I get no errors anymore, and I can actually show a notification with
So all then seems to work. Now, is this a problem in Quasar? Vue? RequireJS? Where do I report this issue? Or have I just done something wrong somewhere? |
Beta Was this translation helpful? Give feedback.
-
I'm trying to figure out how to progressively start using Quasar in my existing website (which I want to move towards a PWA). The site is built with express using requirejs and backbone.
I've got the super simple Vue example working, basically from here.
All in-line in my main html page. I get a button and when I click it the counter goes up by one. Great.
Next step is to use Quasar. But as soon as I add the Quasar script tag to include it I get an error.
Just adding
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/quasar.umd.prod.js"></script>
below the one for vue, in my console I get a 404 for vue.js and this requirejs error:I don't get why requirejs is suddenly wanting to get vue, as this is all done in my plain html file. And Vue was already working fine, just adding the Quasar script triggered this, so it looks like it's something that Quasar is doing/trying?
But okay, vue.js is requested from my backend, so I added it (the same file already included with the script tag for vue), but then I get the following error:
Well, obviously that wasn't going to work anyway, but I'm stuck. How do I get Quasar to just use the Vue already loaded in the html file? What is going on here?
Beta Was this translation helpful? Give feedback.
All reactions