File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -179,16 +179,19 @@ export const FontFamilyInjectionPlugin = (options: FontFamilyInjectionPluginOpti
179
179
}
180
180
}
181
181
} ,
182
- async generateBundle ( _outputOptions , bundle ) {
183
- for ( const key in bundle ) {
184
- const chunk = bundle [ key ] !
185
- if ( chunk ?. type === 'asset' && isCSS ( chunk . fileName ) ) {
186
- const s = await transformCSS ( chunk . source . toString ( ) , key , { relative : true } )
187
- if ( s . hasChanged ( ) ) {
188
- chunk . source = s . toString ( )
182
+ generateBundle : {
183
+ enforce : 'post' ,
184
+ async handler ( _outputOptions , bundle ) {
185
+ for ( const key in bundle ) {
186
+ const chunk = bundle [ key ] !
187
+ if ( chunk ?. type === 'asset' && isCSS ( chunk . fileName ) ) {
188
+ const s = await transformCSS ( chunk . source . toString ( ) , key , { relative : true } )
189
+ if ( s . hasChanged ( ) ) {
190
+ chunk . source = s . toString ( )
191
+ }
189
192
}
190
193
}
191
- }
194
+ } ,
192
195
} ,
193
196
} ,
194
197
}
You can’t perform that action at this time.
0 commit comments