Open renatonmendes opened 7 years ago
Yes getting same error with webpack 2. finding solution for this error. If any one found fix for it. Please share.
You should add this to your index.js, assuming you've added jquery to your package.json:
// bootstrap needs jquery available globally
window.jQuery = window.$ = require('jquery/dist/jquery.min');
@raythree @renatonmendes
Or you can use ProvidePlugin for this:
plugins: [new webpack.ProvidePlugin({$: 'jquery', jquery: 'jquery', jQuery: 'jquery'})]
I´m trying to use the whole structure in a new project with Webpack 2. For some reason I´m getting the following error:
Why is it asking for jQuery ? Help appreaciated.