-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
45 lines (44 loc) · 1.16 KB
/
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
const webpack = require('webpack');
const minifier = require('babili-webpack-plugin');
const path = require('path');
module.exports = [
{
target: 'web',
entry: './src/beesRequest.js',
output: {
filename: 'bees-request.js',
path: path.resolve(__dirname, 'umd'),
library: 'beesRequest',
libraryTarget: 'umd'
},
externals: {
"http": 'http',
"https": 'https',
"follow-redirects": 'follow-redirects',
},
devServer: {
contentBase: path.join(__dirname, "sandbox"),
compress: true,
port: 9000,
}
},
{
target: 'web',
entry: './src/beesRequest.js',
output: {
filename: 'bees-request.min.js',
path: path.resolve(__dirname, 'umd'),
library: 'beesRequest',
libraryTarget: 'umd'
},
externals: {
"http": 'http',
"https": 'https',
"follow-redirects": 'follow-redirects',
},
devtool: 'source-map',
plugins: [
new minifier(),
]
}
];