Skip to content

Commit

Permalink
chore: refactor option name
Browse files Browse the repository at this point in the history
  • Loading branch information
shellscape committed Dec 15, 2024
1 parent 0258081 commit 5426ba9
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions packages/html/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,15 @@ const defaults: Required<RollupHtmlOptions> = {
};

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<RollupHtmlOptions> =
Object.assign({}, defaults, opts);
const {
addScriptsToHead,
attributes,
fileName,
meta,
publicPath,
template,
title
}: Required<RollupHtmlOptions> = Object.assign({}, defaults, opts);

return {
name: 'html',
Expand All @@ -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 = {
Expand Down

0 comments on commit 5426ba9

Please sign in to comment.