Last active
September 16, 2017 16:36
-
-
Save chrisalexander55/243ffc47d39ef848eb9f98771b3c867b to your computer and use it in GitHub Desktop.
Webpack Plugin Config for Bootstrap 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Took me 10 minutes to find how to configure Webpack's plugin system to leverage Bootstrap 4. | |
Also see my other Gist for [installing and configuring Bootstrap 4](https://gist.github.com/chrisalexander55/81f3d5db057fbcbd74d62d488adbca8a). | |
``` | |
plugins: [ | |
new Webpack.ProvidePlugin({ | |
$: 'jquery', | |
jQuery: 'jquery', | |
'window.jQuery': 'jquery', | |
Popper: ['popper.js', 'default'], | |
// In case you imported plugins individually, you must also require them here: | |
Alert: "exports-loader?Alert!bootstrap/js/dist/alert", | |
Button: "exports-loader?Button!bootstrap/js/dist/button", | |
Carousel: "exports-loader?Carousel!bootstrap/js/dist/carousel", | |
Collapse: "exports-loader?Collapse!bootstrap/js/dist/collapse", | |
Dropdown: "exports-loader?Dropdown!bootstrap/js/dist/dropdown", | |
Modal: "exports-loader?Modal!bootstrap/js/dist/modal", | |
Popover: "exports-loader?Popover!bootstrap/js/dist/popover", | |
Scrollspy: "exports-loader?Scrollspy!bootstrap/js/dist/scrollspy", | |
Tab: "exports-loader?Tab!bootstrap/js/dist/tab", | |
Tooltip: "exports-loader?Tooltip!bootstrap/js/dist/tooltip", | |
Util: "exports-loader?Util!bootstrap/js/dist/util", | |
}) | |
] | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment