you can ignore vite and just put links to the cdn for each package in the head of your master layout - exactly as you would have done in laravel 5.4
Laravel 10 with bootstrap 3
Hello,
I am trying to convert a laravel 5.4 site to laravel 10. I installed laravel 10 and I don't want to change the design so I need to install bootstrap 3 and jquery with it.
I can't find a way to do this.
I tried following a few tutorials but they all use bootstrap 5.
I tried using vite and keep getting and error that jQuery is not defined. I think I made a big mass with all the tutorials so maybe someone here can give me the rights steps?
What I have now:
I installed jquery with npm so I have node_modules/jquery folder
I copied the node_modules/bootstrap-sass from the old site
In resources/app.js file:
import jQuery from 'jquery';
window.$ = jQuery;
require('./bootstrap');
In resources/bootstrap.js file:
/**
* We'll load the axios HTTP library which allows us to easily issue requests
* to our Laravel back-end. This library automatically handles sending the
* CSRF token as a header based on the value of the "XSRF" token cookie.
*/
import axios from 'axios';
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
window._ = require('lodash');
I ran npm run build and npm run dev. No idea what I'm doing... Can someone please help?
Please or to participate in this conversation.