Getting Redux DevTools To Work
<p>I followed the <a href="https://github.com/gaearon/redux-devtools/blob/master/docs/Walkthrough.md" rel="nofollow">tutorial</a>, however, am getting the console error:</p>

<p>"<em>Error : Expected the reducer to be a function</em>"</p>

<p>Here is my ( relevant ) configuration:</p>

<p>WEBPACK.CONFIG.JS:</p>

<pre><code>...
const TARGET = process.env.npm_lifecycle_event;
process.env.BABEL_ENV = TARGET;
...
if( TARGET === "start" || !TARGET ) {
    module.exports = merge( common, {
        devtool : "inline-source-map",
        devServer : {
            contentBase : PATHS.build,
            hot : true,
            progress : true,
            stats : "errors-only"
        },
        plugins : [
            new webpack.HotModuleReplacementPlugin(),
            new webpack.DefinePlugin({
                "process.env.NODE_ENV" : JSON.stringify( "production" )
            })
        ]
    } );
}
</code></pre>

<p>INDEX.JS:</p>

<pre><code>import React from "react";
import { render } from "react-dom";
import { Provider } from "react-redux";
import configureStore from "./modcon/ConfigureStore.js";
import MainInterface from "./component/Main.jsx";
import DevTools from "./component/devTools/DevTools.js";

export const store = configureStore();

let initialise = () =&gt; {
    render(
        &lt;Provider store = { store }&gt;
            &lt;div&gt;
                &lt;MainInterface /&gt;
                &lt;DevTools /&gt;                
            &lt;/div&gt;
        &lt;/Provider&gt;,
    );
};
initialise();
</code></pre>

<p>CONFIGURESTORE.JS:</p>

<pre><code>if (process.env.NODE_ENV === "production") {
    module.exports = require("./ConfigureStore.prod");
} else {
    module.exports = require("./ConfigureStore.dev");
}
</code></pre>

<p>CONFIGURESTORE.DEV.JS:</p>

<pre><code>import { createStore, applyMiddleware, compose } from "redux";
import reducer from "./Reducers.js";
import DevTools from "../component/devTools/DevTools";

const enhancer = compose(
    DevTools.instrument()
);

export default function configureStore( initialState ) {
    const store = createStore( reducer, initialState, enhancer );
    console.log( module.hot );
    if (module.hot) {
        module.hot.accept("./Reducers", () =&gt;
        store.replaceReducer(require("./Reducers")/*.default if you use Babel 6+ */));
    }
    return store;
}
</code></pre>

<p>Im not clear on what I am doing wrong.
Thanks</p>