Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
fix: add default doctype option for pug
Browse files Browse the repository at this point in the history
  • Loading branch information
underfin committed Mar 13, 2021
1 parent 741ce11 commit 65bcf92
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/template/compileTemplate.ts
Expand Up @@ -69,7 +69,13 @@ function preprocess(
options: TemplateCompileOptions,
preprocessor: any
): string {
const { source, filename, preprocessOptions } = options
let { source, filename, preprocessOptions } = options
if (options.preprocessLang === 'pug') {
preprocessOptions = {
doctype: 'html',
...preprocessOptions,
}
}

const finalPreprocessOptions = Object.assign(
{
Expand All @@ -92,6 +98,7 @@ function preprocess(
}
)

console.log(res)
if (err) throw err
return res
}
Expand Down

0 comments on commit 65bcf92

Please sign in to comment.