UNPKG

1.22 kBJavaScriptView Raw
1import createStore from './createStore'
2import combineReducers from './combineReducers'
3import bindActionCreators from './bindActionCreators'
4import applyMiddleware from './applyMiddleware'
5import compose from './compose'
6import warning from './utils/warning'
7import __DO_NOT_USE__ActionTypes from './utils/actionTypes'
8
9/*
10 * This is a dummy function to check if the function name has been altered by minification.
11 * If the function has been minified and NODE_ENV !== 'production', warn the user.
12 */
13function isCrushed() {}
14
15if (
16 process.env.NODE_ENV !== 'production' &&
17 typeof isCrushed.name === 'string' &&
18 isCrushed.name !== 'isCrushed'
19) {
20 warning(
21 'You are currently using minified code outside of NODE_ENV === "production". ' +
22 'This means that you are running a slower development build of Redux. ' +
23 'You can use loose-envify (https://github.com/zertosh/loose-envify) for browserify ' +
24 'or setting mode to production in webpack (https://webpack.js.org/concepts/mode/) ' +
25 'to ensure you have the correct code for your production build.'
26 )
27}
28
29export {
30 createStore,
31 combineReducers,
32 bindActionCreators,
33 applyMiddleware,
34 compose,
35 __DO_NOT_USE__ActionTypes
36}