@@ -7,7 +7,6 @@ import type {
77 NormalizedOutputOptions ,
88 RenderedChunk
99} from '../rollup/types' ;
10- import type { PluginDriver } from './PluginDriver' ;
1110import { collapseSourcemaps } from './collapseSourcemaps' ;
1211import type { GetHash } from './crypto' ;
1312import { hasherByType } from './crypto' ;
@@ -21,6 +20,7 @@ import { error, logFailedValidation } from './logs';
2120import type { OutputBundleWithPlaceholders } from './outputBundle' ;
2221import { FILE_PLACEHOLDER , lowercaseBundleKeys } from './outputBundle' ;
2322import { basename , normalize , resolve } from './path' ;
23+ import type { PluginDriver } from './PluginDriver' ;
2424import { SOURCEMAPPING_URL } from './sourceMappingURL' ;
2525import { timeEnd , timeStart } from './timers' ;
2626
@@ -55,11 +55,10 @@ export async function renderChunks(
5555 const getHash = hasherByType [ outputOptions . hashCharacters ] ;
5656 const chunkGraph = getChunkGraph ( chunks ) ;
5757 const {
58- hashDependenciesByPlaceholder,
5958 initialHashesByPlaceholder,
6059 nonHashedChunksWithPlaceholders,
61- placeholders ,
62- renderedChunksByPlaceholder
60+ renderedChunksByPlaceholder ,
61+ hashDependenciesByPlaceholder
6362 } = await transformChunksAndGenerateContentHashes (
6463 renderedChunks ,
6564 chunkGraph ,
@@ -72,7 +71,6 @@ export async function renderChunks(
7271 renderedChunksByPlaceholder ,
7372 hashDependenciesByPlaceholder ,
7473 initialHashesByPlaceholder ,
75- placeholders ,
7674 bundle ,
7775 getHash
7876 ) ;
@@ -285,7 +283,6 @@ async function transformChunksAndGenerateContentHashes(
285283 hashDependenciesByPlaceholder,
286284 initialHashesByPlaceholder,
287285 nonHashedChunksWithPlaceholders,
288- placeholders,
289286 renderedChunksByPlaceholder
290287 } ;
291288}
@@ -294,13 +291,11 @@ function generateFinalHashes(
294291 renderedChunksByPlaceholder : Map < string , RenderedChunkWithPlaceholders > ,
295292 hashDependenciesByPlaceholder : Map < string , HashResult > ,
296293 initialHashesByPlaceholder : Map < string , string > ,
297- placeholders : Set < string > ,
298294 bundle : OutputBundleWithPlaceholders ,
299295 getHash : GetHash
300296) {
301297 const hashesByPlaceholder = new Map < string , string > ( initialHashesByPlaceholder ) ;
302- for ( const placeholder of placeholders ) {
303- const { fileName } = renderedChunksByPlaceholder . get ( placeholder ) ! ;
298+ for ( const [ placeholder , { fileName } ] of renderedChunksByPlaceholder ) {
304299 let contentToHash = '' ;
305300 const hashDependencyPlaceholders = new Set < string > ( [ placeholder ] ) ;
306301 for ( const dependencyPlaceholder of hashDependencyPlaceholders ) {
0 commit comments