forked from richtr/NoSleep.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
46 lines (45 loc) · 981 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
var webpack = require('webpack')
module.exports = {
entry: {
'NoSleep': `${__dirname}/src/index.js`,
'NoSleep.min': `${__dirname}/src/index.js`
},
output: {
path: `${__dirname}/dist`,
filename: '[name].js',
library: 'NoSleep',
libraryTarget: 'umd'
},
module: {
rules: [
{
enforce: 'pre',
test: /\.jsx?$/,
loader: 'standard-loader',
exclude: /(node_modules|bower_components)/,
options: {
parser: 'babel-eslint'
}
},
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['env']
}
}
}
]
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/,
minimize: true
}),
new webpack.BannerPlugin({
banner: `[name].js v0.9.0 - git.io/vfn01 - Rich Tibbett - MIT license`
})
]
}