-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.babel.js
62 lines (58 loc) · 1.38 KB
/
webpack.config.babel.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import path from 'path'
import CopyWebpackPlugin from 'copy-webpack-plugin'
import CleanWebpackPlugin from 'clean-webpack-plugin'
import webpack from 'webpack'
const pkg = require('./package.json')
const banner =
'Temporary Email - ' +
pkg.version +
' | ' +
'(c) 2016, ' +
new Date().getFullYear() +
' ' +
pkg.author +
' | ' +
pkg.license
export default {
context: path.join(__dirname, 'src'),
entry: {
// basics
'js/background.js': ['./js/background.js'],
'js/content.js': ['./js/content.js'],
// providers
'js/providers/tenminutemail.js': [
'./js/providers/tenminutemail/content.js'
],
'js/providers/nada.js': ['./js/providers/nada/content.js'],
'js/providers/guerrillamail.js': [
'./js/providers/guerrillamail/content.js'
],
'js/providers/tempmail.js': ['./js/providers/tempmail/content.js']
},
output: {
path: path.join(__dirname, 'dist'),
filename: './[name]'
},
module: {
rules: [
{
test: /\.js/,
exclude: /(node_modules|bower_components)/,
use: [
{
loader: 'babel-loader'
}
]
}
]
},
plugins: [
new webpack.BannerPlugin(banner),
new CleanWebpackPlugin(['dist']),
new CopyWebpackPlugin([{ from: 'manifest.json' }, { from: 'img/icons/*' }])
],
optimization: {
minimize: true
},
devtool: 'source-map'
}