You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
756 B
42 lines
756 B
8 years ago
|
const path = require('path')
|
||
|
const webpack = require('webpack')
|
||
|
|
||
|
module.exports = {
|
||
|
target: 'node',
|
||
|
node: {
|
||
|
__dirname: false,
|
||
|
__filename: false
|
||
|
},
|
||
|
entry: [
|
||
|
'./index.js'
|
||
|
],
|
||
|
output: {
|
||
|
path: path.join(__dirname, '../dist'),
|
||
|
filename: 'download.js'
|
||
|
},
|
||
|
module: {
|
||
|
loaders: [ {
|
||
|
test: /.js$/,
|
||
|
loader: 'babel-loader',
|
||
|
exclude: /node_modules/,
|
||
|
query: {
|
||
|
plugins: [
|
||
|
'transform-async-to-generator',
|
||
|
'transform-runtime'
|
||
|
],
|
||
|
presets: [
|
||
|
'es2015'
|
||
|
]
|
||
|
}
|
||
|
} ]
|
||
|
},
|
||
|
plugins: [
|
||
|
new webpack.DefinePlugin({
|
||
|
'process.env': {
|
||
|
NODE_ENV: JSON.stringify('production')
|
||
|
}
|
||
|
}),
|
||
|
new webpack.optimize.UglifyJsPlugin()
|
||
|
]
|
||
|
}
|