score:0

Accepted answer

You have to put both loaders in the same line. Instead of using loader, use loaders and pass an array with both loaders.

score:3

In browsers that don't support console, you need to strip console functions from your code. For webpack you can use webpack-strip. One way to use is as follows:

var WebpackStrip = require('webpack-strip')

Then add { test: /\.js$/, loader: WebpackStrip.loader('console.log', 'console.error') } to loaders to strip console.log and console.error

{
    module: {
        loaders: [
            { test: /\.js$/, loader: 'jsx-loader?harmony&insertPragma=React.DOM' },
            { test: require.resolve('react'), loader: 'expose?React' },
            { test: /\.js$/, loader: WebpackStrip.loader('console.log', 'console.error') }
        ]
    }
};

Related Query

More Query from same tag