I've installed the following library via bower: http://ift.tt/2rozF1W
And imported it into my ember-cli project via in ember-cli-build.js
: app.import('bower_components/isMobile/isMobile.min.js');
While it's available via window
, I also want to use it directly in Fastboot mode in node.
You can see in the source of the library, that it actually exports itself for Browserify via module.exports = instantiate();
, so I tried to import it via import isMobile from '../bower_components/isMobile/isMobile.min.js';
, but that throws
Error: Could not find module "frontend/bower_components/isMobile/isMobile.min.js" imported from "frontend/helpers/is-mobile-test"
I think I'm just missing something obvious.
Aucun commentaire:
Enregistrer un commentaire