Skip to content

Commit 8e85a5c

Browse files
committed
fix: add babel-plugin-add-module-exports for default export
[upgrading to Babel 6](6577fb6) silently broke everyone using `redux-thunk` with CommonJS `require` and `module.exports` due to [Kill CommonJS default export behaviour - babel/babel#2212](https://phabricator.babeljs.io/T2212). this fixes that (unintended?) breaking change. see also: - LogRocket/redux-logger@0b34fb9 - https://github.com/59naga/babel-plugin-add-module-exports
1 parent b5707bf commit 8e85a5c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.babelrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"presets": ["es2015", "stage-0"]
2+
"presets": ["es2015", "stage-0"],
3+
"plugins": [
4+
"add-module-exports"
5+
]
36
}

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@
2828
"license": "MIT",
2929
"devDependencies": {
3030
"babel": "^6.1.18",
31+
"babel-cli": "^6.2.0",
3132
"babel-core": "^6.2.1",
3233
"babel-eslint": "^5.0.0-beta4",
33-
"babel-cli": "^6.2.0",
34+
"babel-plugin-add-module-exports": "^0.1.1",
3435
"babel-preset-es2015": "^6.1.18",
3536
"babel-preset-stage-0": "^6.1.18",
3637
"chai": "^3.2.0",

0 commit comments

Comments
 (0)