I'm a Webpack beginner who is trying to refactor an old JavaScript/jQuery application by decomposing it in several ES6 module usign Webpack and Babel.
So far i've managed to refactor the core components of the application, but now i'm stucked with a module that requires jQuery (v2.2) and another library ( BIMsurfer @V1
) available on the global scope.
The problem is that the BIMsurfer library isn't designed as a module and uses Grunt to produce a minified file.
I've seen that i could use the webpack.ProvidePlugin
but i'm getting this error:
TypeError: $.extend is not a function [bimsurfer.js:14]
I've created a GitHub repo with the minimal code to reproduce the error.
My goal is to produce a single bundle with my JavaScript library that can be re-used in several application.
Downloaded your repo and did some test. The webpack config is fine. But there are other problems you need to fix.
var
keyword.once you fix these two problem, you should be able to see a clean console in chrome devtool.