Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

added a replace string to remove BOM from json file before parse #153

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion config/sky-pages/sky-pages.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ function resolve(root, args) {
}

function readConfig(file) {
return JSON.parse(fs.readFileSync(file, 'utf8'));
let bomFreeFile = fs.readFileSync(file, 'utf8').replace(/^\uFEFF/, '');
return JSON.parse(bomFreeFile);
}

module.exports = {
Expand Down