diff --git a/build/footer b/build/footer index 15f6878c..08671933 100644 --- a/build/footer +++ b/build/footer @@ -1,7 +1,2 @@ return ReactFireMixin; -})(); - -// Export ReactFireMixin if this is being run in node -if (typeof module !== "undefined" && typeof process !== "undefined") { - module.exports = ReactFireMixin; -} \ No newline at end of file +})); \ No newline at end of file diff --git a/build/header b/build/header index c1a33dc2..a43b26d1 100644 --- a/build/header +++ b/build/header @@ -8,5 +8,18 @@ * License: MIT */ -var ReactFireMixin = (function() { +;(function (root, factory) { + if (typeof exports === "object") { + // CommonJS + module.exports = factory(); + } else if (typeof define === "function" && define.amd) { + // AMD + define([], function() { + return (root.ReactFireMixin = factory()); + }); + } else { + // Global Variables + root.ReactFireMixin = factory(); + } +}(this, function() { "use strict"; \ No newline at end of file