text: 'use strict';
  
  let path = require('path');
  let webpack = require('webpack');
  
  let baseConfig = require('./base');
  let defaultSettings = require('./defaults');
  
  // Add needed plugins here
  let BowerWebpackPlugin = require('bower-webpack-plugin');
  
  let config = Object.assign({}, baseConfig, {
    entry: path.join(__dirname, '../src/index'),
    cache: false,
    devtool: 'sourcemap',
    plugins: [
      //检测相似文件，去除冗余
      new webpack.optimize.DedupePlugin(),
      new webpack.DefinePlugin({
        'process.env.NODE_ENV': '"production"'
      }),
      new BowerWebpackPlugin({
        searchResolveModulesDirectories: false
      }),
      //压缩js
      new webpack.optimize.UglifyJsPlugin(),
      //按照应用频度来优化代码id，用得越频繁，id越短
      new webpack.optimize.OccurenceOrderPlugin(),
      new webpack.optimize.AggressiveMergingPlugin(),
      //保证编译过程不能出错
      new webpack.NoErrorsPlugin()
    ],
    module: defaultSettings.getDefaultModules()
  });
  
  // Add needed loaders to the defaults here
  config.module.loaders.push({
    test: /\.(js|jsx)$/,
    loader: 'babel',
    include: [].concat(
      config.additionalPaths,
      [ path.join(__dirname, '/../src') ]
    )
  });
  
  module.exports = config;
  