feat: add safe project upgrades and production performance fixes
This commit is contained in:
@@ -55,8 +55,12 @@ export function renderDocument(opts: RenderOptions): string {
|
||||
const extraHead = opts.extraHead ? `\n ${opts.extraHead}` : "";
|
||||
const extraBody = opts.extraBody ? `\n ${opts.extraBody}` : "";
|
||||
|
||||
const htmlAttrs = /(?:^|\s)lang\s*=/.test(opts.htmlAttrs ?? "")
|
||||
? (opts.htmlAttrs ?? "")
|
||||
: `${opts.htmlAttrs ?? ""} lang="en"`;
|
||||
|
||||
return `<!doctype html>
|
||||
<html${opts.htmlAttrs ?? ""}>
|
||||
<html${htmlAttrs}>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
Reference in New Issue
Block a user