Skip to content

Commit 00f7fdb

Browse files
committed
Use CommonJS until Babel ES3 transforms are fixed
Our current presets didn't include ES3 transforms by default, so IE8 support is broken. Normally we would have fixed it by adding a few plugins: * babel-plugin-transform-es3-member-expression-literals * babel-plugin-transform-es3-property-literals Unfortunately there is a [bug in Babel](https://phabricator.babeljs.io/T2817) that prevents them from working correctly in certain cases with `export default` declarations. Until this is resolved, we will go back to using CommonJS modules internally.
1 parent e5741af commit 00f7fdb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
export default function thunkMiddleware({ dispatch, getState }) {
1+
function thunkMiddleware({ dispatch, getState }) {
22
return next => action =>
33
typeof action === 'function' ?
44
action(dispatch, getState) :
55
next(action);
66
}
7+
8+
module.exports = thunkMiddleware

0 commit comments

Comments
 (0)