Skip to content

Commit d8a7af2

Browse files
author
chbaldy
committed
webpack config: add support for bootstrap 4 beta 2
Bootstrap is dependent on jQuery and Popper, so they must be provided explicitly by webpack. This commit includes a new plugin to webpack to fixe a problem related to jQuery and according to the configuration example provided here: http://getbootstrap.com/docs/4.0/getting-started/webpack/ The dependency on Popper should be resolved by including `bootstrap.bundle.js` instead of only `bootstrap.js` in the project imports. The bundled version of bootstrap includes popper since this pull request and should not be a problem in the future. twbs/bootstrap#23735
1 parent 0839b9a commit d8a7af2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

js/webpack_get_defaults.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ module.exports = function (basePath) {
252252
break
253253
}
254254

255+
const providePlugin = new webpack.ProvidePlugin({
256+
$: 'jquery',
257+
})
258+
plugins.push(providePlugin)
259+
255260
return {
256261
cache: true,
257262
context: basePath,

0 commit comments

Comments
 (0)