diff --git a/extensions/autoLoader.js b/extensions/autoLoader.js index 52721e7..7f16c83 100644 --- a/extensions/autoLoader.js +++ b/extensions/autoLoader.js @@ -15,9 +15,15 @@ System.autoLoad = (name, deps, fn) => { System.register(name, deps, fn); return System.import(name); } - const module = {exports: {}, id: name}; - const exports = module.exports; - const declaration = fn(exports, module); + const exports = {}; + const registerExport = (key, value) => { + if (typeof key === 'object'){ + Object(key).forEach((k) => exports[k] = key[k]); + return; + } + exports[key] = value; + }; + const declaration = fn(registerExport, exports); if (!declaration.setters || !declaration.execute) { throw new TypeError('Invalid Module form for ' + name); } diff --git a/package.js b/package.js index 950a413..182c659 100644 --- a/package.js +++ b/package.js @@ -1,6 +1,6 @@ Package.describe({ name: 'universe:modules', - version: '0.6.4', + version: '0.6.5', summary: 'Use ES6 / ES2015 modules in Meteor with SystemJS!', git: 'https://github.com/vazco/universe-modules', documentation: 'README.md'