Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
fix(exports): fix webpack export
Browse files Browse the repository at this point in the history
Fix the module export for webpack

Resolves #108
  • Loading branch information
aaronroberson committed Nov 20, 2015
1 parent 4b9c292 commit 98cdeff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions angular-moment.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,12 @@
}

if (typeof module !== 'undefined' && module && module.exports) {
var moment = moment;
if (typeof moment === 'undefined' && typeof require === 'function') {
moment = requireMoment();
} else {
throw new Error('Moment cannot be found by angular-moment! Please reference to: https://github.com/urish/angular-moment'); // Add wiki/troubleshooting section?
}
angularMoment(angular, moment);
module.exports = 'angularMoment';
} else if (typeof define === 'function' && define.amd) {
Expand Down
2 changes: 1 addition & 1 deletion angular-moment.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 98cdeff

Please sign in to comment.