1
1
1234dima2017-05-09 09:16:42
JavaScript
1234dima, 2017-05-09 09:16:42

How to connect jquery to webpack 2?

Good afternoon. I want to build with webpack 2. I want to include bootstrap + jquery. after installing jquery b bootstrap i get an error: jQuery is not defined. I connect as described in the documentation:
var $ = require("jquery");
And the plugin itself:
plugins: [
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery'
})
]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Manakov, 2017-05-09
@gogolor

So your code can't find jQuery, or bootstrap?
Mb you should try to do this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question