forked from mderrick/react-html5video
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
42 lines (41 loc) · 1.1 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
38
39
40
41
42
var path = require('path');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: [
// CSS Must be first or the Video component will not be
// exported.
'./src/assets/video.css',
'./src/components/video/video.js'
],
target: 'web',
externals: [{
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
}
}],
output: {
path: './dist',
filename: 'ReactHtml5Video.js',
libraryTarget: 'umd',
library: 'ReactHtml5Video'
},
module: {
loaders: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel?optional=runtime'
}, {
test: /\.(svg|woff([\?]?.*)|ttf([\?]?.*)|eot([\?]?.*)|svg([\?]?.*))$/i,
loader: 'url-loader?limit=10000'
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
}]
},
plugins: [
new ExtractTextPlugin('ReactHtml5Video.css')
]
};