Skip to content

Commit

Permalink
Fix options for dev-server
Browse files Browse the repository at this point in the history
  • Loading branch information
danez committed Dec 15, 2016
1 parent 7300818 commit 2e191ff
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/options/WebpackOptionHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const OptionHelper = require('./OptionHelper');
class WebpackOptionHelper extends OptionHelper {

getDefaultOptions() {
return defaults.gruntOptions;
return Object.assign({}, defaults.gruntOptions, defaults.webpackOptions);
}

getWebpackOptions() {
Expand Down
16 changes: 15 additions & 1 deletion src/options/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ const gruntOptions = {
return Array.isArray(options) ? options.some(option => option.watch) : Boolean(options.watch);
},
inline: false,
hot: false,
};

const webpackOptions = {
stats: {
colors: true,
hash: false,
Expand All @@ -27,6 +29,7 @@ const gruntOptions = {
const webpackDevServerOptions = {
port: 8080,
host: 'localhost',
hot: false,
contentBase: '.',
webpack: {
context: '.',
Expand All @@ -35,6 +38,16 @@ const webpackDevServerOptions = {
}
},
keepalive: true,
stats: {
colors: true,
hash: false,
timings: false,
assets: true,
chunks: false,
chunkModules: false,
modules: false,
children: true
},
};

function mergeCustomize(a, b) {
Expand All @@ -55,6 +68,7 @@ function mergeOptions(defaultOptions, options, targetOptions) {
}

exports.gruntOptions = gruntOptions;
exports.webpackOptions = webpackOptions;
exports.webpackDevServerOptions = webpackDevServerOptions;

exports.mergeOptions = mergeOptions;

0 comments on commit 2e191ff

Please sign in to comment.