-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
34 lines (30 loc) · 890 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
const path = require('path');
module.exports = {
entry: path.join(__dirname, 'src', 'main.js'),
devtool: 'source-map',
output: {
library: 'MiniVideoPlayback',
libraryExport: "default",
libraryTarget: 'umd',
filename: 'mini-video-playback.js',
umdNamedDefine: true,
path: path.join(__dirname, 'dist'),
// @see https://stackoverflow.com/a/49119917
globalObject: `(typeof self !== 'undefined' ? self : this)`
},
module: {
rules: [
{
test: /\.js$/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
},
exclude: /node_modules/,
include: path.join(__dirname, 'src')
}
]
}
};