Skip to content

Commit

Permalink
build: move webpack dev server options to webpack.config file
Browse files Browse the repository at this point in the history
  • Loading branch information
vagnervjs committed Mar 28, 2018
1 parent 15dd500 commit 1ff79a4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test": "karma start --single-run",
"test_watch": "karma start",
"watch": "webpack --progress --watch",
"start": "webpack-dev-server --host 0.0.0.0 --content-base public/ --output-public-path latest/ --hot",
"start": "webpack-dev-server",
"build": "webpack",
"release": "webpack --progress --optimize-minimize --output-filename clappr-stats.min.js"
},
Expand Down
12 changes: 12 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
var webpack = require('webpack');
var path = require('path');

module.exports = {
Expand All @@ -16,10 +17,21 @@ module.exports = {
resolve: {
extensions: ['.js']
},
plugins: [
new webpack.NamedModulesPlugin(),
new webpack.HotModuleReplacementPlugin()
],
output: {
path: path.resolve(__dirname, 'dist'),
publicPath: 'latest/',
filename: 'clappr-stats.js',
library: 'ClapprStats',
libraryTarget: 'umd',
},
devServer: {
contentBase: 'public/',
host: '0.0.0.0',
disableHostCheck: true,
hot: true
}
};

0 comments on commit 1ff79a4

Please sign in to comment.