From 5426ba997761e63b3fe8dfe36639a6cb8e00c8c4 Mon Sep 17 00:00:00 2001 From: shellscape Date: Sun, 15 Dec 2024 10:54:13 -0500 Subject: [PATCH] chore: refactor option name --- packages/html/src/index.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/html/src/index.ts b/packages/html/src/index.ts index bd10b6496..73cd7f1a1 100644 --- a/packages/html/src/index.ts +++ b/packages/html/src/index.ts @@ -91,13 +91,15 @@ const defaults: Required = { }; export default function html(opts: RollupHtmlOptions = {}): Plugin { - // const { attributes, fileName, meta, publicPath, template, title, addScriptsToHead } = Object.assign( - // {}, - // defaults, - // opts - // ); - const { attributes, fileName, meta, publicPath, template, title }: Required = - Object.assign({}, defaults, opts); + const { + addScriptsToHead, + attributes, + fileName, + meta, + publicPath, + template, + title + }: Required = Object.assign({}, defaults, opts); return { name: 'html', @@ -122,12 +124,12 @@ export default function html(opts: RollupHtmlOptions = {}): Plugin { const files = getFiles(bundle); const source = await template({ attributes, + addScriptsToHead, bundle, files, meta, publicPath, - title, - addScriptsToHead + title }); const htmlFile: EmittedAsset = {