javascript - Error when using webpack with jQuery -


i'm starting use webpack, , have issue when try use jquery it. i'm newbie webpack, please apologize if question seems basic.

here webpack.config.js:

var webpack = require("webpack"); var path = require("path"); var bower_dir = __dirname + "/public/js/bower_components"; var compiled_dir = __dirname + "/public/js/compiled";  module.exports = {     entry: {         signup: compiled_dir + "/signup"     },     plugins: [         new webpack.provideplugin({             $ : "jquery",             jquery : "jquery",             "window.jquery" : "jquery",             "root.jquery" : "jquery"         })     ],     resolve: {         alias: {             jquery : bower_dir + "/jquery/src/jquery",         }     },     output: {         path: path.join(__dirname, "public/js/dist"),         filename: "[name].bundle.js"     }  }; 

as i'm using provideplugin (for jquery plugins), have no require("jquery") @ begininng of file. however, @ execution, output on console :

typeerror: jquery.expr undefined http://localhost:9000/js/dist/signup.bundle.js line 6250

do have clue ?

thanks in advance.

solved removing "resolve" section in webpack.config.js , installing jquery npm. however, if explain me why works now, grateful :-)


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -