How to include jQuery before angular in webpack with ES6?
this work:
module.exports = {
module: {
loaders: [
{ test: /angular(\.min)?\.js$/, loader: "imports?$=jquery" },
{ test: /jquery(\.min)?\.js$/, loader: 'expose?jQuery' }
]
}
};
but you need to install expose-loader
from npm:
npm install expose-loader --save
Why not use a very nice and simple plugin for webpack
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery"
})
ES6-seed with webpack and jquery