-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
45 lines (42 loc) · 1007 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
'use strict';
var HtmlWebpackPlugin = require('html-webpack-plugin');
var path = require('path');
var pkg = require('./package.json');
var webpack = require('webpack');
var debug = process.env.NODE_ENV !== 'production';
module.exports = {
resolve: {},
entry: {
'video-player': './js/index.js'
},
output: {
path: __dirname + '/dist',
filename: '[name].min.js',
libraryTarget: 'umd',
library: 'inertiaVideoPlayer'
},
alias: {},
debug: debug,
plugins: [
new webpack.ProvidePlugin({
'DMVAST': 'vast-client/vast-client',
}),
new webpack.DefinePlugin({
VERSION: JSON.stringify(pkg.version)
}),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify(debug ? 'development' : 'production')
}
}),
new HtmlWebpackPlugin({
template: 'html/player.html',
minify: {
collapseWhitespace: true,
minifyJS: true
},
inject: false,
filename: 'player.html'
})
]
};