Option #1: Use ProvidePlugin
Add the ProvidePlugin to the plugins array in both build/webpack.dev.conf.js and build/webpack.prod.conf.js so that jQuery becomes globally available to all your modules:
plugins: [
// ...
new webpack.ProvidePlugin({
$: 'jquery',
jquery: 'jquery',
'window.jQuery': 'jquery',
jQuery: 'jquery'
})
]
Option #2: Use Expose Loader module for webpack
As @TremendusApps suggests in his answer, add the Expose Loader package:
npm install expose-loader --save-dev
Use in your entry point main.js like this:
import 'expose?$!expose?jQuery!jquery'
// ...