const path = require('path');
const webpack = require('webpack');

const base = require('./webpack.config.base');

const config = base('production');

module.exports = Object.assign({}, config, {
    output: Object.assign({}, config.output, {
        path: path.join(__dirname, '..', 'examples', 'assets'),
    }),

    plugins: config.plugins.concat([
        new webpack.optimize.UglifyJsPlugin({
            compress: {
                warnings: false,
                // Disabled because of an issue with Uglify breaking seemingly valid code:
                // https://github.com/facebookincubator/create-react-app/issues/2376
                // Pending further investigation:
                // https://github.com/mishoo/UglifyJS2/issues/2011
                comparisons: false,
            },
            mangle: {
                safari10: true,
            },
            output: {
                comments: false,
                // Turned on because emoji and regex is not minified properly using default
                // https://github.com/facebookincubator/create-react-app/issues/2488
                ascii_only: true,
            },
        }),
    ]),
});

@@ -185,24 +185,120 @@
 , config, %7B%0A
+    // See http://webpack.github.io/docs/configuration.html#devtool%0A    devtool: 'source-map',%0A%0A
     output: 

Use source maps in production build