Skip to content

Instantly share code, notes, and snippets.

@anthonyterrell
Created December 30, 2017 23:01
Show Gist options
  • Save anthonyterrell/335403f2258637f76e0962ac505d5d3c to your computer and use it in GitHub Desktop.
Save anthonyterrell/335403f2258637f76e0962ac505d5d3c to your computer and use it in GitHub Desktop.
Using bootstrap 4.0 beta with Laravel 5.4+
# Bootstrap Theming
# http://getbootstrap.com/docs/4.0/getting-started/theming/
# FILE: resources/assets/js/bootstrap.js
try {
window.$ = window.jQuery = require('../../../node_modules/jquery/dist/jquery');
window.Popper = require('../../../node_modules/popper.js/dist/popper');
require('../../../node_modules/bootstrap/dist/js/bootstrap');
} catch (e) {
}
# FILE: package.json
# include bootsrap beta & popper.js
"bootstrap": "^4.0.0-beta.2",
"popper.js": "^1.12.9",
# remove bootstrap sass
"bootstrap-sass": "^3.3.7",
# npm install
# npm run dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment