scottjehl / Respond

A fast & lightweight polyfill for min/max-width CSS3 Media Queries (for IE 6-8, and more)
MIT License
11.33k stars 3.36k forks source link

Apply the method to window explicitly #347

Open bbeirnaert opened 8 years ago

bbeirnaert commented 8 years ago

To include respond.js using webpack, it is required to have the scope specified explicitly to window (instead of this), since it is enclosed in an import function where this is not window.

iam4x commented 8 years ago

@bbeirnaert You can also use imports-loader :

const respondjs = require('imports-loader?this=>window!Respond.js/dest/respond.min');