Skip to content

Commit 2241370

Browse files
committed
feat(debug): add colorized console for plugin fatals
1 parent a3ced67 commit 2241370

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/template.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function prepareTempEntries(
8787
const tmp = readFileSync(configPath, { encoding: "utf-8" })
8888
pageData = JSON.parse(tmp)
8989
} else {
90-
throw new Error(`Page entry: ${entry.abs}, its config (config.json) cannot be found, please check!`)
90+
_console.fatal(`Page entry: ${entry.abs}, its config (config.json) cannot be found, please check!`)
9191
}
9292
const generatedHtml = fetchTemplateHTML(entry, pageData)
9393
if (existsSync(entry.abs + "/" + entry.__options.templateName)) {

0 commit comments

Comments
 (0)