I’m trying to add Jquery and Boostrap.js to my project. I’m doing this by downloading the file jquery.js and bootstrap.js and placing them in my vender > js folder.
Do I need to import these files into my app.js file to get them to work? Currently they are not just by adding them to the vendor.js folder.
Do I need to alter my webpack.confid.js file? I wouldn’t think so.
Thanks but I did find this and it doesn’t answer how to work with the js files I’ve downloaded, only css. I didn’t use npm to install the dependencies either.
The jQuery library is then downloaded in assets/node_modules and available to be imported on any javascript file. If I create a script like assets/js/custom.js, I can then import jQuery like so
// assets/js/custom.js
import jQuery from "jquery"
jQuery(document).ready(function($){
...
})
and to include the script into the assets pipeline I have to import it in app.js