I'm just starting to dip my fingers into the world of webpack. I use awesome Vue.js with vueify, so my modules are ES6.
One of the difficulties I am facing is downloading some third-party jQuery plugins. I use ProvidePlugin to load jQuery - which works great.
plugins: [ new webpack.ProvidePlugin({ $: "jquery", jQuery: "jquery" }) ]
Then I have a directory called plugins containing jQuery plugins. I understand that the script loader just loads them into the linked file as strings, and they are evaluated when the package loads. Then these scripts can be used as if they were loaded into a regular script tag (i.e. no import is required).
But I just can't get any of the plugins to work. Below is an array of my bootloaders. What am I doing wrong (or not doing)?
loaders: [ // process *.vue files using vue-loader { test: /\.vue$/, loader: 'vue' }, // process *.js files using babel-loader // the exclude pattern is important so that we don't // apply babel transform to all the dependencies! { test: /\.js$/, loader: 'babel', exclude: /node_modules/ }, { test: /plugins\.js$/, loader: 'script-loader'
source share