@@ -127,26 +127,28 @@ export function qwikRollup(qwikRollupOpts: QwikRollupPluginOptions = {}): any {
127
127
return rollupPlugin ;
128
128
}
129
129
130
- export function normalizeRollupOutputOptions (
130
+ export async function normalizeRollupOutputOptions (
131
131
qwikPlugin : QwikPlugin ,
132
132
rollupOutputOpts : Rollup . OutputOptions | Rollup . OutputOptions [ ] | undefined ,
133
133
useAssetsDir : boolean ,
134
134
outDir ?: string
135
- ) : Rollup . OutputOptions | Rollup . OutputOptions [ ] {
135
+ ) : Promise < Rollup . OutputOptions | Rollup . OutputOptions [ ] > {
136
136
if ( Array . isArray ( rollupOutputOpts ) ) {
137
137
// make sure at least one output is present in every case
138
138
if ( ! rollupOutputOpts . length ) {
139
139
rollupOutputOpts . push ( { } ) ;
140
140
}
141
141
142
- return rollupOutputOpts . map ( ( outputOptsObj ) => ( {
143
- ...normalizeRollupOutputOptionsObject ( qwikPlugin , outputOptsObj , useAssetsDir ) ,
144
- dir : outDir || outputOptsObj . dir ,
145
- } ) ) ;
142
+ return await Promise . all (
143
+ rollupOutputOpts . map ( async ( outputOptsObj ) => ( {
144
+ ...( await normalizeRollupOutputOptionsObject ( qwikPlugin , outputOptsObj , useAssetsDir ) ) ,
145
+ dir : outDir || outputOptsObj . dir ,
146
+ } ) )
147
+ ) ;
146
148
}
147
149
148
150
return {
149
- ...normalizeRollupOutputOptionsObject ( qwikPlugin , rollupOutputOpts , useAssetsDir ) ,
151
+ ...( await normalizeRollupOutputOptionsObject ( qwikPlugin , rollupOutputOpts , useAssetsDir ) ) ,
150
152
dir : outDir || rollupOutputOpts ?. dir ,
151
153
} ;
152
154
}
0 commit comments