Anna Kurylo
2018-10-17 ccc40e94e2da9fe9aa1cb560b97e3e618cefb1da
webpack.config.js
@@ -2,45 +2,29 @@
var plugins = [
  new webpack.DefinePlugin({
       'process.env': { NODE_ENV: '"production"'}
     'process.env': { NODE_ENV: '"production"'}
  })
];
if (process.env.COMPRESS) {
  plugins.push(
    new webpack.optimize.UglifyJsPlugin({
      compressor: {
        warnings: false
      }
    })
  );
}
module.exports = {
  entry: ['./src/DateTimeField.jsx'],
  entry: ['./DateTime.js'],
  output: {
    path: __dirname + "/dist/",
    path: __dirname + '/dist/',
    library: 'Datetime',
    libraryTarget: 'umd',
    libraryTarget: 'umd'
  },
  resolve: {
    extensions: ['', '.js', '.jsx']
    extensions: ['', '.js']
  },
  externals: {
    'react': 'React',
    'react-dom': 'ReactDOM',
    'moment': 'moment'
  },
  module: {
    loaders: [
      { test: /\.jsx$/, loader: 'jsx-loader' }
    ]
  },
  plugins: plugins
};