- Remove Bootstrap from
web/static/css/phoenix.css
. npm install --save-dev bootstrap@4.0.0-alpha.5
- Update
brunch-config.js
:
npm: {
// Add this.
styles: {
bootstrap: ["dist/css/bootstrap.css"]
}
}
If you’d like to use Bootstrap’s JavaScript you also have to:
npm install --save-dev jquery
- Update
brunch-config.js
:
modules: {
autoRequire: {
// Add "jquery".
"js/app.js": ["jquery", "web/static/js/app"]
}
},
npm: {
// Add this.
globals: {"jQuery": "jquery"}
}
This is required to make jQuery available to Bootstrap’s JavaScript.
Hope it helps.