File tree 1 file changed +4
-2
lines changed 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ function viteLegacyPlugin(options = {}) {
181
181
/**
182
182
* @param {string | ((chunkInfo: import('rollup').PreRenderedChunk) => string) } fileNames
183
183
* @param {string? } defaultFileName
184
- * @returns {(chunkInfo: import('rollup').PreRenderedChunk) => string) }
184
+ * @returns {string | ( (chunkInfo: import('rollup').PreRenderedChunk) => string) }
185
185
*/
186
186
const getLegacyOutputFileName = (
187
187
fileNames ,
@@ -559,7 +559,9 @@ async function buildPolyfillChunk(
559
559
}
560
560
}
561
561
} )
562
- const polyfillChunk = ( Array . isArray ( res ) ? res [ 0 ] : res ) . output [ 0 ]
562
+ const _polyfillChunk = Array . isArray ( res ) ? res [ 0 ] : res
563
+ if ( ! ( 'output' in _polyfillChunk ) ) return
564
+ const polyfillChunk = _polyfillChunk . output [ 0 ]
563
565
564
566
// associate the polyfill chunk to every entry chunk so that we can retrieve
565
567
// the polyfill filename in index html transform
You can’t perform that action at this time.
0 commit comments