Skip to content

Commit 828033b

Browse files
committed
feat(create-config): support head option
1 parent 3eaff16 commit 828033b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/createConfig.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ interface CreateConfigOptions {
154154
* @default {{}}
155155
*/
156156
output: OutputOptions;
157+
158+
/**
159+
* Append content to the `head` element in `index.html`
160+
*/
161+
head: string;
157162
}
158163

159164
export default function createConfig(opts: Partial<CreateConfigOptions> = {}): InputOptions {
@@ -197,6 +202,7 @@ export default function createConfig(opts: Partial<CreateConfigOptions> = {}): I
197202
${custom_css}
198203
${opts.style || ""}
199204
</style>
205+
${opts?.head ?? ""}
200206
</head>
201207
<body>
202208
<noscript>You need to enable JavaScript to run this app.</noscript>

0 commit comments

Comments
 (0)