Skip to content

Commit

Permalink
Fix: nodemon can't read config files encoded with BOM e.g. UTF-8-BOM #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Patrick authored and remy committed Sep 4, 2017
1 parent fb5da38 commit 0e4b310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/config/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function loadFile(options, config, dir, ready) {
var settings = {};

try {
settings = JSON.parse(data);
settings = JSON.parse(data.toString('utf8').replace(/^\uFEFF/, ''));
config.loaded.push(filename);
} catch (e) {
console.error(e);
Expand Down

0 comments on commit 0e4b310

Please sign in to comment.