-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
I'm using the exact configuration as specified in the Readme, and the import of Modernizr works.
However, when I go to use the thing, I get the error Uncaught TypeError: _modernizr2.default.mq is not a function
.
Here is my modernizr config:
{
"minify": true,
"options": [
"setClasses",
"mq"
],
"feature-detects": []
}
When I use mq
, I get the error above. Here is my code:
import Modernizr from 'modernizr'
...
var query = Modernizr.mq('screen and (max-width: 600px)')
Incidentally, if I print out the Modernizr
object, I get this:
{
"minify":true,
"options": ["setClasses","mq"],
"feature-detects":[]
}
Where it's quite obvious that mq
is not even a direct descendant, let alone a function.
However, this is what the docs say to do, so what gives?
Metadata
Metadata
Assignees
Labels
No labels