Closed JokerFe closed 2 years ago
This is working as intended. CommonJS modules are executed within a wrapper function ((function(module,exports,require){ /* code */ })()
, so those variables are scoped and should not be overwriting anything.
It sounds like you're running the CommonJS bundle without actually using a CommonJS loader, which won't work. I would recommend using the umd
, iife
or es
module types instead.
After the packed file compresses the variable name, it will use $, causing the $of jQuery to be overwritten