forked from jitsi/lib-jitsi-meet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
37 lines (34 loc) · 1.17 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
const path = require('path');
const process = require('process');
const sharedConfig = require('./webpack-shared-config');
module.exports = (_env, argv) => {
// Despite what whe docs say calling webpack with no arguments results in mode not being set.
const mode = typeof argv.mode === 'undefined' ? 'production' : argv.mode;
const config
= sharedConfig(mode === 'production' /* minimize */, Boolean(process.env.ANALYZE_BUNDLE) /* analyzeBundle */);
return [
Object.assign({}, config, {
entry: {
'lib-jitsi-meet': './index.js'
},
output: Object.assign({}, config.output, {
library: 'JitsiMeetJS',
libraryTarget: 'umd',
path: path.join(process.cwd(), 'dist', 'umd')
})
}),
{
entry: {
worker: './modules/e2ee/Worker.js'
},
mode,
output: {
filename: 'lib-jitsi-meet.e2ee-worker.js',
path: path.join(process.cwd(), 'dist', 'umd')
},
optimization: {
minimize: false
}
}
];
};