Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot convert undefined or null to object #2

Closed
59naga opened this issue Nov 11, 2015 · 0 comments
Closed

TypeError: Cannot convert undefined or null to object #2

59naga opened this issue Nov 11, 2015 · 0 comments

Comments

@59naga
Copy link
Owner

59naga commented Nov 11, 2015

broken If the default is undefined.

'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
var foo = 'bar';
exports.foo = foo;
module.exports = Object.assign(exports.default, exports);
babel index.js --presets es2015 --plugins add-module-exports > bundle.js
# 'use strict';
#
# Object.defineProperty(exports, "__esModule", {
#   value: true
# });
# var foo = 'bar';
# exports.foo = foo;
# module.exports = Object.assign(exports.default, exports);

node bundle.js
# module.exports = Object.assign(exports.default, exports);
#                         ^

# TypeError: Cannot convert undefined or null to object
#     at Function.assign (native)
# ...
@59naga 59naga closed this as completed in 00042cc Nov 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant