Skip to content

Commit

Permalink
新增支持webworker 修改kernel-flv 的编译方式
Browse files Browse the repository at this point in the history
  • Loading branch information
sgy committed Nov 7, 2017
1 parent 8059d82 commit c96aa9e
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
Binary file added config/.DS_Store
Binary file not shown.
35 changes: 35 additions & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const path = require('path');

module.exports = {
entry: {
app:['./src/index.js']
},

output: {
path: path.resolve(__dirname, '../lib'),
filename: 'index.js',
library: 'chimeeKernelFlv',
libraryTarget: 'umd',
libraryExport: 'default'

},

module: {
loaders: [
{
test: /\.js$/,
exclude: [
path.resolve(__dirname, '../node_modules')
],
use: [
{
loader: 'babel-loader',
options: {
'presets': ['latest'],
}
}
]
}
]
}
}
14 changes: 14 additions & 0 deletions config/webpackServer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var config = require("./webpack.config.js");
var webpack = require('webpack');
var WebpackDevServer = require('webpack-dev-server');
var path = require('path');

config.entry.app.unshift("webpack-dev-server/client?http://localhost:8080/");

var compiler = webpack(config);

var server = new WebpackDevServer(compiler, {
contentBase: path.resolve(__dirname, '../'),
publicPath: "/assets/"
});
server.listen(8080);

0 comments on commit c96aa9e

Please sign in to comment.