Skip to content

Instantly share code, notes, and snippets.

@mdouglass
Last active March 4, 2016 22:22
Show Gist options
  • Save mdouglass/a6a5c5aae68ac03a92d3 to your computer and use it in GitHub Desktop.
Save mdouglass/a6a5c5aae68ac03a92d3 to your computer and use it in GitHub Desktop.
{
"presets": [
"es2015"
],
"plugins": [
"transform-runtime",
"transform-export-extensions"
]
}
node_modules
export const foo = 'bar'
'use strict';
import _Object$defineProperty from 'babel-runtime/core-js/object/define-property';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _lib = require('./lib');
var _loop = function _loop(_key2) {
if (_key2 === "default") return 'continue';
_Object$defineProperty(exports, _key2, {
enumerable: true,
get: function get() {
return _lib[_key2];
}
});
};
for (var _key2 in _lib) {
var _ret = _loop(_key2);
if (_ret === 'continue') continue;
}
console.log(module.exports.foo);
export * from './lib'
console.log(module.exports.foo)
{
"name": "runtime-import-export-repro",
"version": "0.0.1",
"main": "src/main.js",
"scripts": {
"transpile": "babel main.js -o main-transpiled.js",
"start": "babel-node main.js"
},
"devDependencies": {
"babel-cli": "^6.1.18",
"babel-core": "^6.1.19",
"babel-plugin-transform-export-extensions": "^6.1.18",
"babel-plugin-transform-runtime": "^6.1.18",
"babel-preset-es2015": "^6.1.18"
},
"dependencies": {
"babel-runtime": "^6.1.18"
}
}
@RebootJeff
Copy link

Found this gist after some Googling (thanks for making this gist!) but had to do more digging to find the issue tracker. It's not on GitHub, it's here: https://phabricator.babeljs.io/T2877

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment