const webpack = require('webpack');

module.exports = {
  entry: {
    ContentSelectionText: './src/ContentSelectionText.js',
    Popup: './src/Popup.js',
    Background: './src/Background.js',
  },
  output: {
    path: './_build/extension/',
    filename: '[name].bundle.js',
  },
  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /(node_modules|_build)/,
        loader: 'babel-loader',
        query: {
          presets: ['latest', 'react', 'stage-0']
        }
      },
      {
        test: /\.(png|jpg|gif|json|html|css)$/,
        loader: 'file-loader?name=[name].[ext]'
      }
    ],
  },
  plugins: [
    // new webpack.DefinePlugin({
    //   'process.env':{
    //     'NODE_ENV': JSON.stringify('production')
    //   }
    // }),
    // new webpack.optimize.UglifyJsPlugin({
    //   exclude: /(_build)/,
    // })
  ],
};

@@ -801,32 +801,148 @@
 glifyJsPlugin(%7B%0A
+    //   // running uglify over pre-optimized jsoo code adds octal literals%0A    //   // which are deprecated in FF.%0A
     //   exclude
@@ -947,24 +947,38 @@
 de: /(_build
+%7CBackground.js
 )/,%0A    // %7D

exclude Background.js from optimization until we can optimize for strict more in FF safely