File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ function viteLegacyPlugin(options = {}) {
181181 /**
182182 * @param {string | ((chunkInfo: import('rollup').PreRenderedChunk) => string) } fileNames
183183 * @param {string? } defaultFileName
184- * @returns {(chunkInfo: import('rollup').PreRenderedChunk) => string) }
184+ * @returns {string | ( (chunkInfo: import('rollup').PreRenderedChunk) => string) }
185185 */
186186 const getLegacyOutputFileName = (
187187 fileNames ,
@@ -559,7 +559,9 @@ async function buildPolyfillChunk(
559559 }
560560 }
561561 } )
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 ]
563565
564566 // associate the polyfill chunk to every entry chunk so that we can retrieve
565567 // the polyfill filename in index html transform
You can’t perform that action at this time.
0 commit comments