-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
34 lines (33 loc) · 1004 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
var webpack = require('webpack');
var path = require('path');
module.exports = {
entry: './src/Player.js',
output: {
path: path.join(__dirname, '/dist'),
filename: 'player.js',
publicPath: '//imgcache.qq.com/open/qcloud/video/vcplayer/',
library: "vcp",
libraryTarget: "umd"
},
module: {
loaders: [
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'es3ify' // 主要是为了支持IE<=8
},
{
test: /\.js$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel',
query: {
presets: ['es2015-loose'] // 更贴近ES5,可兼容更多浏览器,比如说IE9
}
}
]
}
}