Skip to content

Commit b644e53

Browse files
committed
minor #39 [Core] Pass resolved options to copyManifest (Kocal)
This PR was merged into the main branch. Discussion ---------- [Core] Pass resolved options to copyManifest | Q | A | -------------- | --- | Bug fix? | no | New feature? | no | Deprecations? | no | Documentation? | no | Issues | - | License | MIT `copyManifest` takes `{ publicPath, manifestKeyPrefix }`, and all three call sites built that object literal from `resolved` verbatim. Since `ResolvedOptions` already carries both fields, this passes `resolved` straight through and drops the repeated literal. The function signature stays narrow, so it still documents the only two fields it actually reads. No behavior change. Commits ------- 721d52b [Core] Pass resolved options to copyManifest
2 parents 44995b3 + 721d52b commit b644e53

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

assets/src/index.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,7 @@ export const unpluginFactory: UnpluginFactory<Options | undefined> = (options, _
8282
}
8383
const manifest = {
8484
...buildManifest(graph, ctx),
85-
...copyManifest(copyFiles, {
86-
publicPath: resolved.publicPath,
87-
manifestKeyPrefix: resolved.manifestKeyPrefix,
88-
}),
85+
...copyManifest(copyFiles, resolved),
8986
};
9087
this.emitFile({
9188
type: 'asset',
@@ -145,10 +142,7 @@ export const unpluginFactory: UnpluginFactory<Options | undefined> = (options, _
145142
writeSymfonyFiles(
146143
resolved.outputPath,
147144
buildEntrypoints(configToDevGraph(server.config), ctx),
148-
copyManifest(copyFiles, {
149-
publicPath: resolved.publicPath,
150-
manifestKeyPrefix: resolved.manifestKeyPrefix,
151-
})
145+
copyManifest(copyFiles, resolved)
152146
);
153147
} catch (err) {
154148
server.config.logger.error(
@@ -292,10 +286,7 @@ export const unpluginFactory: UnpluginFactory<Options | undefined> = (options, _
292286
if (isDev) {
293287
const copyFiles = resolveCopyFiles(resolved.copy, false);
294288
writeCopyFiles(copyFiles, resolved.outputPath);
295-
manifest = copyManifest(copyFiles, {
296-
publicPath: resolved.publicPath,
297-
manifestKeyPrefix: resolved.manifestKeyPrefix,
298-
});
289+
manifest = copyManifest(copyFiles, resolved);
299290
} else {
300291
manifest = buildManifest(graph, ctx);
301292
}

0 commit comments

Comments
 (0)