Skip to content

Commit 67bc262

Browse files
authored
Revert "Revert "feat(turbopack): support next.js specific node polyfills"" (vercel#55392)
Reverts vercel#55385 Closes WEB-1565
1 parent 42ad2ce commit 67bc262

14 files changed

+19
-192
lines changed

packages/next-swc/crates/next-core/src/next_import_map.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,12 @@ pub async fn insert_next_shared_aliases(
661661
import_map.insert_singleton_alias("react", project_path);
662662
import_map.insert_singleton_alias("react-dom", project_path);
663663

664+
//https://github.com/vercel/next.js/blob/f94d4f93e4802f951063cfa3351dd5a2325724b3/packages/next/src/build/webpack-config.ts#L1196
665+
import_map.insert_exact_alias(
666+
"setimmediate",
667+
request_to_import_mapping(project_path, "next/dist/compiled/setimmediate"),
668+
);
669+
664670
insert_turbopack_dev_alias(import_map);
665671
insert_package_alias(
666672
import_map,

packages/next-swc/crates/next-dev-tests/tests/integration/next/polyfill/basic/input/app/app/client.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

packages/next-swc/crates/next-dev-tests/tests/integration/next/polyfill/basic/input/app/app/page.tsx

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/next-swc/crates/next-dev-tests/tests/integration/next/polyfill/basic/input/app/layout.tsx

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/next-swc/crates/next-dev-tests/tests/integration/next/polyfill/basic/input/pages/index.tsx

Lines changed: 0 additions & 58 deletions
This file was deleted.

packages/next-swc/crates/next-dev-tests/tests/integration/next/polyfill/basic/input/pages/page.tsx

Lines changed: 0 additions & 20 deletions
This file was deleted.

packages/next-swc/crates/next-dev-tests/tests/integration/next/polyfill/basic/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-1ea14a.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/next-swc/crates/next-dev-tests/tests/integration/next/polyfill/basic/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-9b3c3c.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/next-swc/crates/next-dev-tests/tests/integration/next/polyfill/basic/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-0b346e.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/next-swc/crates/next-dev-tests/tests/integration/next/polyfill/basic/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-c0b6ea.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)