mirror of
https://github.com/wassname/keras-js.git
synced 2026-09-09 11:25:25 +08:00
34 lines
646 B
JavaScript
34 lines
646 B
JavaScript
const webpack = require('webpack')
|
|
|
|
module.exports = {
|
|
devtool: 'cheap-module-eval-source-map',
|
|
module: {
|
|
loaders: [
|
|
{
|
|
test: /\.js$/,
|
|
loaders: ['babel-loader'],
|
|
exclude: /node_modules/
|
|
}
|
|
]
|
|
},
|
|
output: {
|
|
library: 'KerasJS',
|
|
libraryTarget: 'umd'
|
|
},
|
|
resolve: {
|
|
extensions: ['', '.js']
|
|
},
|
|
plugins: [
|
|
new webpack.optimize.OccurenceOrderPlugin(),
|
|
new webpack.DefinePlugin({
|
|
'process.env.NODE_ENV': JSON.stringify('production')
|
|
}),
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
compressor: {
|
|
screw_ie8: true,
|
|
warnings: false
|
|
}
|
|
})
|
|
]
|
|
}
|