text: "use strict";
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.default = _default;
  
  var _getConfig = _interopRequireDefault(require("af-webpack/getConfig"));
  
  var _browsers = _interopRequireDefault(require("./defaultConfigs/browsers"));
  
  var _getEntry = _interopRequireDefault(require("./utils/getEntry"));
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
  
  const debug = require('debug')('roadhog:getWebpackConfig');
  
  const isDev = process.env.NODE_ENV === 'development';
  
  function _default(opts = {}) {
    const cwd = opts.cwd,
          config = opts.config,
          babel = opts.babel,
          paths = opts.paths,
          entry = opts.entry;
    const browserslist = config.browserslist || _browsers.default;
    debug(`babel: ${babel}`);
    debug(`browserslist: ${browserslist}`);
    return (0, _getConfig.default)(_extends({
      cwd
    }, config, {
      entry: (0, _getEntry.default)({
        cwd: paths.appDirectory,
        entry: entry || config.entry,
        isBuild: !isDev
      }),
      babel: config.babel || {
        presets: [[babel, {
          browsers: browserslist
        }], ...(config.extraBabelPresets || [])],
        plugins: config.extraBabelPlugins || []
      },
      browserslist
    }));
  }