-
Notifications
You must be signed in to change notification settings - Fork 39
/
webpack.config.js
47 lines (47 loc) · 922 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
47
module.exports = {
entry: {
OpusMediaRecorder: './src/OpusMediaRecorder.js'
},
mode: 'development',
output: {
globalObject: 'typeof self !== \'undefined\' ? self : this'
},
module: {
rules: [
{
enforce: 'pre',
test: /\.(js|jsx|mjs)$/,
exclude: [
/node_modules/,
/build/
],
use: 'eslint-loader'
},
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
}
]
},
devServer: {
contentBase: [`${__dirname}/build`, `${__dirname}/docs`],
compress: true,
host: '0.0.0.0',
port: 9000,
https: true,
index: 'index.html',
overlay: {
warnings: true,
errors: true
},
watchOptions: {
poll: false
}
}
};