Skip to content

Commit

Permalink
Merge pull request #103 from hswolff/api-default
Browse files Browse the repository at this point in the history
Add default filename when using through api
  • Loading branch information
sokra committed Mar 9, 2015
2 parents 08f9b87 + 82dea4b commit a5a9e2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ var historyApiFallback = require("connect-history-api-fallback");
function Server(compiler, options) {
// Default options
if(!options) options = {};

if (options.lazy && !options.filename) {
throw new Error("'filename' option must be set in lazy mode.");
}

this.hot = options.hot;
this.headers = options.headers;

Expand Down

0 comments on commit a5a9e2e

Please sign in to comment.