@@ -28,7 +28,6 @@ export type HintMode = 'prefetch' | 'preload' | 'modulepreload' | 'preconnect' |
2828export interface IndexHtmlGeneratorProcessOptions {
2929 lang : string | undefined ;
3030 baseHref : string | undefined ;
31- outputPath : string ;
3231 files : FileInfo [ ] ;
3332 hints ?: { url : string ; mode : HintMode ; as ?: string } [ ] ;
3433}
@@ -49,6 +48,7 @@ export interface IndexHtmlGeneratorOptions {
4948 imageDomains ?: string [ ] ;
5049 generateDedicatedSSRContent ?: boolean ;
5150 autoCsp ?: AutoCspOptions ;
51+ outputPath : string ;
5252
5353 /**
5454 * Integrity metadata for module URLs not directly referenced in the index
@@ -182,10 +182,11 @@ function augmentIndexHtmlPlugin(generator: IndexHtmlGenerator): IndexHtmlGenerat
182182 entrypoints,
183183 imageDomains,
184184 chunksIntegrity,
185+ outputPath,
185186 } = generator . options ;
186187
187188 return async ( html , options ) => {
188- const { lang, baseHref, outputPath = '' , files, hints } = options ;
189+ const { lang, baseHref, files, hints } = options ;
189190
190191 return augmentIndexHtml ( {
191192 html,
@@ -209,7 +210,7 @@ function inlineFontsPlugin({ options }: IndexHtmlGenerator): IndexHtmlGeneratorP
209210 minify : options . optimization ?. styles . minify ,
210211 } ) ;
211212
212- return async ( html ) => inlineFontsProcessor . process ( html ) ;
213+ return ( html ) => inlineFontsProcessor . process ( html ) ;
213214}
214215
215216function inlineCriticalCssPlugin (
@@ -221,10 +222,10 @@ function inlineCriticalCssPlugin(
221222 deployUrl : generator . options . deployUrl ,
222223 readAsset : ( filePath ) => generator . readAsset ( filePath ) ,
223224 autoCsp,
225+ outputPath : generator . options . outputPath ,
224226 } ) ;
225227
226- return async ( html , options ) =>
227- inlineCriticalCssProcessor . process ( html , { outputPath : options . outputPath } ) ;
228+ return ( html ) => inlineCriticalCssProcessor . process ( html ) ;
228229}
229230
230231function addNoncePlugin ( ) : IndexHtmlGeneratorPlugin {
0 commit comments