drug95107
2018-02-12 22:59
浏览 178
已采纳

使用Laravel 5.5从Bootstrap 3.3.7迁移到4.0

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.

图片转代码服务由CSDN问答提供 功能建议

我已经在5.5版本的Laravel中启动了一个项目,包括Bootstrap v.3.3.7。 现在,我想测试是否可以切换到新的4.0版本。

我已经读过这个但我不确定我项目中编写的所有代码是否都适用于新版本,我也使用Laravel中包含的bootstrap-sass。 / p>

我是否只需要运行:

  npm uninstall bootstrap 
npm install bootstrap 
   
  
 

要包含新版本的sass预处理器还是我的代码必须完全破坏?

我愿意接受任何建议,因为我不知道这是不是 可能。

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • douchunsui2395 2018-02-12 23:06
    已采纳

    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.

    打赏 评论

相关推荐 更多相似问题