Answer the question
In order to leave comments, you need to log in
What is the correct way to export jQuery to the global scope in webpack including plugins?
Now I do this:
module: {
rules: [{
test: require.resolve('jquery'),
use: [{
loader: 'expose-loader',
options: '$'
}, {
loader: 'expose-loader',
options: 'jQuery'
}]
}],
},
import $ from 'jquery';
import 'jquery.maskedinput';
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