Skip to content

Commit c96aa9e

Browse files
author
sgy
committed
新增支持webworker 修改kernel-flv 的编译方式
1 parent 8059d82 commit c96aa9e

3 files changed

Lines changed: 49 additions & 0 deletions

File tree

config/.DS_Store

6 KB
Binary file not shown.

config/webpack.config.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
const path = require('path');
2+
3+
module.exports = {
4+
entry: {
5+
app:['./src/index.js']
6+
},
7+
8+
output: {
9+
path: path.resolve(__dirname, '../lib'),
10+
filename: 'index.js',
11+
library: 'chimeeKernelFlv',
12+
libraryTarget: 'umd',
13+
libraryExport: 'default'
14+
15+
},
16+
17+
module: {
18+
loaders: [
19+
{
20+
test: /\.js$/,
21+
exclude: [
22+
path.resolve(__dirname, '../node_modules')
23+
],
24+
use: [
25+
{
26+
loader: 'babel-loader',
27+
options: {
28+
'presets': ['latest'],
29+
}
30+
}
31+
]
32+
}
33+
]
34+
}
35+
}

config/webpackServer.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var config = require("./webpack.config.js");
2+
var webpack = require('webpack');
3+
var WebpackDevServer = require('webpack-dev-server');
4+
var path = require('path');
5+
6+
config.entry.app.unshift("webpack-dev-server/client?http://localhost:8080/");
7+
8+
var compiler = webpack(config);
9+
10+
var server = new WebpackDevServer(compiler, {
11+
contentBase: path.resolve(__dirname, '../'),
12+
publicPath: "/assets/"
13+
});
14+
server.listen(8080);

0 commit comments

Comments
 (0)