reactjsreduxreact-reduxredux-formrollup

RollupJS ES6 module can't get imported because of default not found for redux and redux-form


I have made a package for my login form that use react-redux and redux-form.

Both react-redux and redux-form are peer dependencies.

WARNING in ./node_modules/login-form/dist/login-form.es.js 7455:22-33 "export 'default' (imported as '_reactRedux') was not found in 'react-redux'

WARNING in ./node_modules/login-form/dist/login-form.es.js 7505:17-23 "export 'default' (imported as '_redux') was not found in 'redux'

I have never imported myself redux in my login form project.

This was bundled by rollup and that was present in my es module :

import _reactRedux from 'react-redux';
import _redux from 'redux';

I must have done something wrong, but I don't know what.

This is the list of my rollup dependencies

"rollup": "^0.50.0",
"rollup-plugin-babel": "^3.0.2",
"rollup-plugin-cleanup": "^1.0.1",
"rollup-plugin-commonjs": "^8.2.1",
"rollup-plugin-inject": "^2.0.0",
"rollup-plugin-json": "^2.3.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-replace": "^2.0.0",
"rollup-plugin-uglify": "^2.0.1",
"rollup-plugin-visualizer": "^0.3.1",
"rollup-watch": "^4.3.1",

Solution

  • I manage to install it using in externals instead of 'redux-form' => 'redux-form-immutable'