forked from Dash-Industry-Forum/dash.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.prod.cjs
40 lines (36 loc) · 1.01 KB
/
webpack.prod.cjs
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
const { merge } = require('webpack-merge');
const ESLintPlugin = require('eslint-webpack-plugin');
const common = require('./webpack.base.cjs').config;
const entries = {
'dash.all': './index.js',
'dash.mss': './src/mss/index.js',
'dash.mediaplayer': './index_mediaplayerOnly.js',
'dash.protection': './src/streaming/protection/Protection.js',
'dash.reporting': './src/streaming/metrics/MetricsReporting.js',
'dash.offline': './src/offline/index.js'
}
const configDev = merge(common, {
mode: 'development',
entry: entries,
output: {
filename: '[name].debug.js'
}
});
const configProd = merge(common, {
mode: 'production',
entry: entries,
output: {
filename: '[name].min.js'
},
performance: { hints: false },
plugins: [
new ESLintPlugin({
files: [
'src/**/*.js',
'test/unit/mocks/*.js',
'test/unit/test/**/*.js'
]
})
]
});
module.exports = [configDev, configProd];