You need to inject a global window.jQuery first. react code example
Example: You need to inject a global window.jQuery first.
module: {
rules: [{
test: require.resolve('jquery'),
use: [{
loader: 'expose-loader',
options: '$'
}]
}]
}