Skip to content

Commit

Permalink
Export the component directly, not as *.default
Browse files Browse the repository at this point in the history
Using this module in node previously required a
`var ContentEditable = require("react-contenteditable").default`
Now, importing the module is done with
`var ContentEditable = require("react-contenteditable")`

This commit BREAKS COMPATIBILITY (thus, there was a version bump)

Fixes #12
Thanks to @sebasgarcep
See esnext/es6-module-transpiler#85 for more info
  • Loading branch information
lovasoa committed Jan 19, 2016
1 parent f720f99 commit 38726a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/react-contenteditable.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,5 @@ var ContentEditable = function (_React$Component) {
return ContentEditable;
}(_react2.default.Component);

exports.default = ContentEditable;
exports.default = ContentEditable;
module.exports = exports['default'];
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-contenteditable",
"version": "1.1.0",
"version": "2.0.0",
"description": "React component representing a <div> with editable contents",
"main": "./lib/react-contenteditable.js",
"peerDependencies": {
Expand All @@ -21,6 +21,7 @@
},
"devDependencies": {
"babel-cli": ">=6",
"babel-plugin-add-module-exports": ">=0",
"babel-plugin-transform-object-assign": ">=6",
"babel-preset-es2015": ">=6"
},
Expand All @@ -29,7 +30,8 @@
"es2015"
],
"plugins": [
"transform-object-assign"
"transform-object-assign",
"add-module-exports"
]
},
"scripts": {
Expand Down

0 comments on commit 38726a3

Please sign in to comment.