import webpack from "webpack";
import config from './gulp/config';

var webpackConfig = {
    output: {
        filename: "[name].js",
        sourceMapFilename: 'maps/[name].map',
        jsonpFunction: 'f'
    },
    devtool: '#inline-source-map',
    resolve: {
        modulesDirectories: [
            'bower_components',
            'node_modules',
            'src',
            'lib'
        ]
    },
    module: {
        preLoaders: [
            { test: /\.js$/, exclude: /node_modules|bower_components/, loader: 'eslint-loader' }
        ],
        loaders: [
            { test: /\.html$/, loader: 'html-loader' },
            { test: /test\/.*?\.js$/, loaders: ['webpack-espower-loader'] },
            { test: /\.js/, exclude: /node_modules|bower_components/, loaders: ['babel-loader'] }
        ]
    },
    plugins: [
        new webpack.DefinePlugin({
            IS_PRODUCTION: config.IS_PRODUCTION
        }),
        new webpack.optimize.UglifyJsPlugin({
            compress: {
                warnings: false
            }
        }),
        //new webpack.optimize.CommonsChunkPlugin('app','app.js'),
        new webpack.optimize.AggressiveMergingPlugin(),
        new webpack.optimize.OccurenceOrderPlugin(),
        new webpack.optimize.DedupePlugin()
    ],
    eslint: {
        configFile: '.eslintrc',
        failOnError: true
    }
};

export default webpackConfig;
@@ -646,23 +646,19 @@
 t: /
-test%5C/.*?
+Spec
 %5C.js$/
+i
 , lo
@@ -719,16 +719,17 @@
 t: /%5C.js
+$
 /, exclu
@@ -958,32 +958,67 @@
 glifyJsPlugin(%7B%0A
+            exclude: /Spec%5C.js$/i,%0A
             comp

テストコードもbabelを通し、Uglifyは除外するよう修正