Files
keras-js/demos/webpack.prod.config.js
T
2016-09-19 15:57:17 -04:00

46 lines
900 B
JavaScript

const path = require('path')
const webpack = require('webpack')
const autoprefixer = require('autoprefixer')
module.exports = {
entry: [
path.join(__dirname, 'src/index')
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js'
},
module: {
loaders: [
{
test: /\.js$/,
loaders: ['babel-loader'],
exclude: /node_modules/
},
{
test: /\.css$/,
loader: 'style-loader!css-loader!postcss-loader'
}
]
},
postcss: [
autoprefixer({ browsers: ['last 2 versions'] })
],
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
}
})
]
}