diff --git a/.babelrc b/.babelrc index efc3f16..2fb9edf 100644 --- a/.babelrc +++ b/.babelrc @@ -24,5 +24,9 @@ ], "react" ], - "plugins": ["transform-flow-strip-types", "transform-class-properties"] + "plugins": [ + "transform-flow-strip-types", + "transform-class-properties", + "add-module-exports" + ] } diff --git a/package.json b/package.json index 3e90102..5380878 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "publishConfig": { "registry": "https://registry.npmjs.org/" }, - "runkitExample": "const {ComponentFutureState} = require('set-future-state')", + "runkitExample": "const withFutureState = require('set-future-state')", "scripts": { "lint": "eslint .", "pretest:lib": "yarn build", @@ -50,6 +50,7 @@ "babel-cli": "^6.26.0", "babel-eslint": "^8.2.2", "babel-jest": "^22.4.3", + "babel-plugin-add-module-exports": "^0.2.1", "babel-plugin-transform-class-properties": "^6.24.1", "babel-plugin-transform-flow-strip-types": "^6.22.0", "babel-preset-env": "^1.6.1", diff --git a/yarn.lock b/yarn.lock index cb995ec..bdf3a30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -571,6 +571,10 @@ babel-messages@^6.23.0: dependencies: babel-runtime "^6.22.0" +babel-plugin-add-module-exports@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-0.2.1.tgz#9ae9a1f4a8dc67f0cdec4f4aeda1e43a5ff65e25" + babel-plugin-check-es2015-constants@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a"