Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor option name
Browse files Browse the repository at this point in the history
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
@@ -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',
@@ -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 = {

0 comments on commit 5426ba9

Please sign in to comment.