Answer the question
In order to leave comments, you need to log in
Why does webpack build see jQuery plugins selectively?
I am using the webpack assembly for the first time on the project and during this time I often had the idea to stop doing it. The topic of webpack and jQuery plugins has been more than covered, but what if js sees plugins selectively after assembly?
webpack.config.js:
plugins: [
new webpack.ProvidePlugin({
$: 'jquery/dist/jquery.min.js',
jQuery: 'jquery/dist/jquery.min.js',
'window.jQuery': 'jquery/dist/jquery.min.js',
'window.$': 'jquery',
})
]
import './vendor/fancybox-master/dist/jquery.fancybox.min.js';
import './vendor/slick/slick/slick.js';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question