Skip to content

Remove window-binding hack with imports-loader

Mike Greiling requested to merge remove-imports-loader-window-bind into master

What does this MR do?

Removes a hack that wraps every script in (function(){ ... }).call(window); for the sake of preserving sprockets behavior in scripts which take for granted that this is the same thing as window. Instead the scripts which rely on this behavior have been modified directly.

Are there points in the code the reviewer needs to double check?

Make sure nothing has broken.

Why was this MR needed?

The imports-loader hack throws off sourcemaps and has some odd side-effects in babel like not allowing import/export to function properly.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

#27486 (moved)

Merge request reports