lib/webpack.js
function getConfig(react) {
  const loaders = [{
    test: /\.js$/,
    exclude: /node_modules/,
    loader: 'babel',
    query: _util.babelFEOptions
  }, {
    test: /\.json$/,
    loader: 'json'
  }, {
    test: /jsdom/,
    loader: 'null'
  }];

  if (react) {
    loaders.unshift({
      test: /\.js$/,
      exclude: /node_modules/,
      loader: 'react-hot'
    });
  }

  return {
    cache,
    debug: true,
    node: { fs: 'empty' },
    module: { loaders },

    // temporary hack while `react-hot-loader` v3 is not out
    resolve: {
      alias: {
        'react/lib/ReactMount': 'react-dom/lib/ReactMount'
      }
    }
  };
}
function getConfig(react) {
  const loaders = [{
    test: /\.js$/,
    exclude: /node_modules/,
    loader: 'babel',
    query: _util.babelFEOptions
  }, {
    test: /\.json$/,
    loader: 'json'
  }, {
    test: /jsdom/,
    loader: 'null'
  }];

  if (react) {
    loaders.unshift({
      test: /\.js$/,
      exclude: /node_modules/,
      loader: 'react-hot'
    });
  }

  return {
    cache,
    debug: true,
    node: { fs: 'empty' },
    module: { loaders },

    // temporary hack while `react-hot-loader` v3 is not out
    resolve: {
      alias: {
        'react/lib/ReactMount': 'react-dom/lib/ReactMount'
      }
    }
  };
}
function getConfig ( react ) { const loaders = [ { test : / \.js$ / , exclude : / node_modules / , loader : 'babel' , query : _util . babelFEOptions } , { test : / \.json$ / , loader : 'json' } , { test : / jsdom / , loader : 'null' } ] ; if ( react ) { loaders . unshift ( { test : / \.js$ / , exclude : / node_modules / , loader : 'react-hot' } ) ; } return { cache , debug : true , node : { fs : 'empty' } , module : { loaders } , // temporary hack while `react-hot-loader` v3 is not out resolve : { alias : { 'react/lib/ReactMount' : 'react-dom/lib/ReactMount' } } } ; }
Webpack helpers. Mostly for internal use.

You can use it to tweak the Babel options.

@module webpack
@private
 
Returns a webpack configuration object.

@memberof module:webpack
@private
@method getConfig
@param {boolean} react - true if the react loader is needed
@return {Object} webpack configuration object
Webpack helpers . Mostly for internal use .