3

I've started a project with Laravel in version 5.5 including Bootstrap v.3.3.7. For now, I want to test if I can switch to the new 4.0 release.

I've already read this but I'm not sure that all the code written in my project will work with the new version, also I'm using the bootstrap-sass included in Laravel.

Do I simply need to run :

npm uninstall bootstrap
npm install bootstrap

To get the new version of the sass preprocessor included or will my code be absolutely broken?

I'm open to any advice because I don't know if this is possible.

WebDevBooster
  • 14,674
  • 9
  • 66
  • 70
JeuneApprenti
  • 489
  • 3
  • 20

1 Answers1

5

Just put "bootstrap": "^4.0.0" inside of your package.json and run npm update, all the changes you need to worry about are Breaking changes when upgrading from v3.6 to v4

NOTE: As the PO mentioned in the comments, on this link you can find which files you need to modify in order to properly load Bootstrap 4 into your older Laravel versions, specifically versions below and including 5.5.

Nikola Gavric
  • 3,507
  • 1
  • 8
  • 16
  • After tries, I can tell that [this other related question](https://stackoverflow.com/questions/43590808/incompatible-units-rem-and-px-bootstrap-4-and-laravel-mix) is truly helping is someone migrate too with Laravel because it was also my problem. – JeuneApprenti Feb 13 '18 at 14:30
  • Thanks for pointing that out, I completely forgot about possible loading issues with `v4` :D – Nikola Gavric Feb 13 '18 at 14:37