aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorFederico Zivolo <[email protected]>2017-11-15 14:13:33 +0100
committerJohann-S <[email protected]>2017-11-15 14:13:33 +0100
commit7fd265034c5fc3c9e078e960a97b8a2279ff1933 (patch)
tree4d6a49f17a305c0e4baf33de9f0d9daf4c28bf48 /docs
parentffc5965f2c7ee2c04d464bf2cfa2c5d4ca66470b (diff)
downloadbootstrap-7fd265034c5fc3c9e078e960a97b8a2279ff1933.tar.xz
bootstrap-7fd265034c5fc3c9e078e960a97b8a2279ff1933.zip
Use UMD and fix build to properly load deps (#24783)
Diffstat (limited to 'docs')
-rw-r--r--docs/4.0/getting-started/webpack.md22
1 files changed, 3 insertions, 19 deletions
diff --git a/docs/4.0/getting-started/webpack.md b/docs/4.0/getting-started/webpack.md
index 29a2bd831..4093b12ab 100644
--- a/docs/4.0/getting-started/webpack.md
+++ b/docs/4.0/getting-started/webpack.md
@@ -26,25 +26,9 @@ import 'bootstrap/js/dist/dropdown';
...
{% endhighlight %}
-Bootstrap is dependent on [jQuery](https://jquery.com/) and [Popper](https://popper.js.org/), so npm will install them for you if needed. But they must be explicitly provided by webpack. Add the following code to the `plugins` section in your webpack config file:
-
-{% highlight js %}
- // don't forget to import webpack (using import or require) to use webpack.ProvidePlugin
- 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:
- Util: "exports-loader?Util!bootstrap/js/dist/util",
- Dropdown: "exports-loader?Dropdown!bootstrap/js/dist/dropdown",
- ...
- })
- ...
- ]
-{% endhighlight %}
+Bootstrap is dependent on [jQuery](https://jquery.com/) and [Popper](https://popper.js.org/),
+these are defined as `peerDependencies`, this means that you will have to make sure to add both of them
+to your `package.json` using `npm --save jquery popper.js`.
{% callout warning %}
Notice that if you chose to **import plugins individually**, you must also install [exports-loader](https://github.com/webpack-contrib/exports-loader)