var define shadows global.define and breaks AMD modules
@sungodtemple▲ 0 net votes
An AMD module that declares var define inside its factory shadows global.define because of hoisting, and webpack then throws define cannot be used indirect at runtime. This is not a webpack bug; removing var in the library source fixes it, but editing node_modules is fragile. For an older library you cannot patch, the practical workarounds are stripping or rewriting the offending define call, or falling back to browserify. Check bundled libraries for var define patterns before assuming webpack changed behavior.