@@ -49,17 +49,13 @@ export function viteSingleFile({
4949 inlinePattern = [ ] ,
5050 deleteInlinedFiles = true ,
5151} : Config = defaultConfig ) : PluginOption {
52-
53- function warnNotInlined ( filename : string ) {
54- console . debug ( `NOTE: asset not inlined: ${ filename } ` )
55- }
56-
5752 return {
5853 name : "vite:singlefile" ,
5954 config : useRecommendedBuildConfig ? _useRecommendedBuildConfig : undefined ,
6055 enforce : "post" ,
61- generateBundle : ( _ , bundle ) => {
62- console . debug ( "\n" )
56+ generateBundle ( _ , bundle ) {
57+ const warnNotInlined = ( filename : string ) => this . info ( `NOTE: asset not inlined: ${ filename } ` )
58+ this . info ( "\n" )
6359 const files = {
6460 html : [ ] as string [ ] ,
6561 css : [ ] as string [ ] ,
@@ -88,7 +84,7 @@ export function viteSingleFile({
8884 }
8985 const jsChunk = bundle [ filename ] as OutputChunk
9086 if ( jsChunk . code != null ) {
91- console . debug ( `Inlining: ${ filename } ` )
87+ this . info ( `Inlining: ${ filename } ` )
9288 bundlesToDelete . push ( filename )
9389 replacedHtml = replaceScript ( replacedHtml , jsChunk . fileName , jsChunk . code , removeViteModuleLoader )
9490 }
@@ -99,7 +95,7 @@ export function viteSingleFile({
9995 continue
10096 }
10197 const cssChunk = bundle [ filename ] as OutputAsset
102- console . debug ( `Inlining: ${ filename } ` )
98+ this . info ( `Inlining: ${ filename } ` )
10399 bundlesToDelete . push ( filename )
104100 replacedHtml = replaceCss ( replacedHtml , cssChunk . fileName , cssChunk . source as string )
105101 }
0 commit comments