-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
45 lines (40 loc) · 944 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 path = require('path')
var ExtractPlugin = require('extract-text-webpack-plugin')
module.exports = {
entry: path.join(__dirname, 'src', 'index'),
output: {
library: 'ReactVideoPlayer',
libraryTarget: 'umd'
},
module: {
loaders: [
{
test: /\.js?$/,
exclude: /node_modules/,
loader: 'babel'
},
{
test: /\.less$/,
exclude: /node_modules/,
loader: ExtractPlugin.extract('style-loader', 'css-loader!less-loader')
},
// {
// test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
// loader: 'url-loader?limit=10000&mimetype=image/svg+xml'
// }
{loader: 'file-loader', test: /\.svg(\?v=\d+\.\d+\.\d+)?$/}
]
},
plugins: [new ExtractPlugin('VideoPlayer.css')],
externals: [
{
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
}
}
]
}