const path = require('path') const webpack = require('webpack') module.exports = { entry: [ 'babel-polyfill', path.join(__dirname, 'src/index') ], output: { path: path.join(__dirname, 'dist'), filename: 'keras.js', library: 'KerasJS', libraryTarget: 'umd' }, module: { loaders: [ { test: /\.js$/, loaders: ['babel-loader'], exclude: /node_modules/ } ] }, resolve: { extensions: ['.js'] }, plugins: [ new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify('production') } }), new webpack.optimize.DedupePlugin(), new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }) ] }