You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This expects jquery to be present as $. I have jquery installed on my application with npm, and I am using it elsewhere successfully with import $ from 'jquery'. However how do I require jquery in the <Head> before my custom.prism.js file is loaded so it is able to find and use the $ variable?
I understand I could just scrap jquery in npm and include it as above but I do like the idea of being able to use npm to upgrade jquery if I want.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
So I have a static script I am including in the _app.js as so.
This expects jquery to be present as $. I have jquery installed on my application with npm, and I am using it elsewhere successfully with import $ from 'jquery'. However how do I require jquery in the
<Head>
before my custom.prism.js file is loaded so it is able to find and use the $ variable?I understand I could just scrap jquery in npm and include it as above but I do like the idea of being able to use npm to upgrade jquery if I want.
Any input would be great.
Thanks
Chris
Beta Was this translation helpful? Give feedback.
All reactions