Open vikeri opened 9 years ago
I wan't to use Modernizr to determine if the client can run famo.us, I therefore downloaded a beta version of Modernizer as suggested here: http://stackoverflow.com/questions/25261412/detect-whether-the-browser-supports-famo-us
I saved that to src/modernizr.js and added it so the top of my main.js looks like this:
src/modernizr.js
main.js
/* globals define */ define(function(require, exports, module) { 'use strict'; require(['modernizr'],function(){ if(!Modernizr.testAllProps('transformStyle', 'preserve-3d')){ //Send user to static if Famo.us not supported window.location.replace("/components/1.html"); } });
This works well when I use the dev version grunt serve, but fails to load when I use only grunt to generate the production version. Any ideas why?
grunt serve
grunt
The error I get in the console is the following:
Error: undefined missing modernizr
I wan't to use Modernizr to determine if the client can run famo.us, I therefore downloaded a beta version of Modernizer as suggested here: http://stackoverflow.com/questions/25261412/detect-whether-the-browser-supports-famo-us
I saved that to
src/modernizr.js
and added it so the top of mymain.js
looks like this:This works well when I use the dev version
grunt serve
, but fails to load when I use onlygrunt
to generate the production version. Any ideas why?The error I get in the console is the following:
Error: undefined missing modernizr