Detectizr icon indicating copy to clipboard operation
Detectizr copied to clipboard

Using with webpack (modernizr-loader)

Open gen4sp opened this issue 8 years ago • 2 comments

I am trying to import Detectizr right after Modernizr

import Modernizr from 'modernizr';
import Detectizr from 'detectizr';
 console.log('> >', Modernizr, Detectizr);

it makes an error:

Uncaught TypeError: Cannot read property 'documentElement' of undefined

If I remove Detectizr, everything is ok, Modernizr works well.

Any special advice with working with modernizr-loader or webpack?

gen4sp avatar Oct 15 '17 09:10 gen4sp

This is still an issue. I think it's before webpack compiles alphabetically so Detectizr is coming before Modernizr.

richgcook avatar Jun 26 '19 20:06 richgcook

Any updates? Or can you suggest some other library which works with webpack?

Berezhnyk avatar Dec 30 '19 10:12 Berezhnyk