We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In v3 I used to import bindActionCreators from lib dir, that contained code compiled to cjs
lib
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const bindActionCreators = _interopRequireDefault(require('redux/lib/bindActionCreators'))
In v4 this is no longer possible.
I cant use src dir too, because it's es
src
# will throw error because of the `export ....` function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const bindActionCreators = _interopRequireDefault(require('redux/src/bindActionCreators'))
Workaround is
const bindActionCreators = require('redux').bindActionCreators
but it's bad for project size
Q: why not to return cjs compiled files?
The text was updated successfully, but these errors were encountered:
With a tree-shaking bundler, any unused imports will be automatically dropped. That won't apply to CJS files, but will work with ES modules.
This and other reasons are in the PR that changed this: #2358
Sorry, something went wrong.
No branches or pull requests
In v3 I used to import bindActionCreators from
lib
dir, that contained code compiled to cjsIn v4 this is no longer possible.
I cant use
src
dir too, because it's esWorkaround is
but it's bad for project size
Q: why not to return cjs compiled files?
The text was updated successfully, but these errors were encountered: