forked from AxisCommunications/media-stream-library-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
42 lines (42 loc) · 1.02 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
module.exports = {
target: 'web',
entry: './lib/index.browser.ts',
mode: 'production',
output: {
library: 'mediaStreamLibrary',
path: __dirname,
filename: 'dist/media-stream-library.min.js',
},
resolve: {
extensions: ['.ts', '.js'],
// The debug packages resolves to src/debug.js by default
// which doesn't work on IE11 (it's not ES5), but it seems
// that the dist/debug.js file does work.
alias: {
debug: 'debug/dist/debug.js',
},
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
sourceType: 'unambiguous',
presets: [
['@babel/env', { useBuiltIns: 'usage', corejs: 3 }],
'@babel/typescript',
],
plugins: [
'@babel/proposal-class-properties',
'@babel/proposal-object-rest-spread',
],
babelrc: false,
},
},
},
],
},
}