Skip to content

Commit

Permalink
fix(dynamic-require): update to match new webpack chunk format (#2947)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Dec 19, 2024
1 parent 1596dd0 commit d59f0dd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/rollup/plugins/dynamic-require.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ async function getWebpackChunkMeta(src: string) {
const chunk = await import(pathToFileURL(src).href).then(
(r) => r.default || r || {}
);
const { id, ids, modules } = chunk;
const {
__webpack_id__,
__webpack_ids__,
__webpack_modules__,
id = __webpack_id__,
ids = __webpack_ids__,
modules = __webpack_modules__,
} = chunk;
if (!id && !ids) {
return null; // Not a webpack chunk
}
Expand Down

0 comments on commit d59f0dd

Please sign in to comment.