Skip to content

Commit

Permalink
throw if filename option property isn't set in lazy mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hswolff committed Mar 7, 2015
1 parent dff1b75 commit 82dea4b
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 82dea4b

Please sign in to comment.