karlhorky/gray

Error when trying to import the package

dingo-d opened this issue ยท 5 comments

I'm using webpack to bundle my scripts, and when I try to load the package in the script using

import gray from 'jquery-gray';

I get

Uncaught TypeError: Cannot read property 'documentElement' of undefined

It would seem like it's coming from the modernizer ๐Ÿคท๐Ÿผโ€โ™‚๏ธ

Any idea what could be the issue?

Hm, interesting, maybe related to this (there are a few workarounds there):

webpack/webpack#512 (comment)

Could be, will check it out, thnx!

@dingo-d I just published a new version 1.7.0 with the latest version of Modernizr included. Seems to be working in IE 9 and 11.

Can you upgrade and let me know whether this helps?

Yup, works perfectly when combined with the CSS filter on modern browsers. Thanks!

Great, thanks also for testing!