You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that commonjs bundles for redux-thunk-error-handler (and for redux-thunk-recursion-detect) are not compatible with ES5. They are using const keyword.
λ es-check es5 reduxThunkErrorHandler.cjs.js
ES-Check: there were 1 ES version matching errors.
ES-Check Error:
----
· erroring file: reduxThunkErrorHandler.cjs.js
· error: SyntaxError: The keyword 'const' is reserved (7:0)
Is that on purpose?
The text was updated successfully, but these errors were encountered:
By default we don't transpile node_modules dependencies. We assume that they are in ES5. Lucky default webpack uglify plugin understands only ES5, therefore we found the problem quite quickly.
Of course we can include those packages in babel-loader processing. The annoying part is that we want to use those packages in library which is used few applications, therefore each application needs to change their build scripts.
Yes, that is true, the libraries published here are all using ES6. We do use babel in the build process, but I think we're only using a single babel plugin, for object-rest-spread, because that support is still not available in the latest version of Edge. All other modern browsers support all the syntax used here.
The commonjs compiled versions are ES6 with commonjs require instead of ES6 Modules and the import statement.
Unless you're trying to support some very old browsers, and need to compile to ES5, I'd recommend switching your webpack build from uglify to terser. It's more compatible with new language constructs and runs faster as well. Newer versions of webpack switched by default.
It seems that commonjs bundles for redux-thunk-error-handler (and for redux-thunk-recursion-detect) are not compatible with ES5. They are using
const
keyword.Is that on purpose?
The text was updated successfully, but these errors were encountered: