From 8ffa18a5977c56bcd953d14a7d374804d1eb41ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20B=C3=B6hm?= Date: Tue, 25 Aug 2015 11:18:52 +0200 Subject: [PATCH] =?UTF-8?q?feat(webpack/browserify):=20final=20fix=20?= =?UTF-8?q?=F0=9F=98=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hey @egilkh, First: Thanks for this! :) 2nd: to enable the easy import like: angular.module('App', [ require('angular-ui-router'), require('ngstorage') ]); You need to export the module name as string, not the module :) --- ngStorage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ngStorage.js b/ngStorage.js index 0505485..c8806d5 100644 --- a/ngStorage.js +++ b/ngStorage.js @@ -4,7 +4,8 @@ if (typeof define === 'function' && define.amd) { define(['angular'], factory); } else if (typeof exports === 'object') { - module.exports = factory(require('angular')); + factory(require('angular')); + module.exports = 'ngStorage'; } else { // Browser globals (root is window), we don't register it. factory(root.angular);