Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 623 Bytes

File metadata and controls

15 lines (10 loc) · 623 Bytes

symfony-webpack-encore-bootstrap-4

  • yarn add @symfony/webpack-encore --dev

  • yarn add jquery --dev

  • yarn add [email protected]

Many of Bootstrap 4 components require the use of JavaScript to function. Specifically, they require jQuery, Popper.js, and Bootstrap own JavaScript plugins. jQuery must come first, then Popper.js, and then our JavaScript plugins.

So its necessary to require bootstrap.bundle.js instead of bootstrap.js in your main JS file due to Popper dependency.

require('bootstrap/dist/js/bootstrap.bundle.js');

See the example file