diff --git a/src/index.js b/src/index.js index 1b11c797147..367fa8d059f 100644 --- a/src/index.js +++ b/src/index.js @@ -4,6 +4,20 @@ import bindActionCreators from './utils/bindActionCreators' import applyMiddleware from './utils/applyMiddleware' import compose from './utils/compose' +/* +* create a function so that we can check if the function name has been atlered by minification +* if the function has been minified and NODE_ENV !== 'production', warn the user +*/ +function isCrushed() {} + +if (isCrushed.name !== 'isCrushed' && process.env.NODE_ENV !== 'production') { + console.warn('You are utilzing minified code outside of NODE_ENV === \'production\'. ' + + 'This means that you are running a slower development only build of Redux. ' + + 'Consult tools such as loose-envify (https://github.com/zertosh/loose-envify) for browserify ' + + 'and DefinePlugin for webpack (http://stackoverflow.com/questions/30030031) ' + + 'to build with proper NODE_ENV') // eslint-disable-line no-console +} + export { createStore, combineReducers,