From 9e752d2966a8f1d65f93b2e2115c24c32c91d10a Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Wed, 19 Jun 2024 12:19:38 +0200 Subject: [PATCH 1/3] Upgrade Turbopack --- Cargo.lock | 74 +++++++++++++++++++------------------- Cargo.toml | 6 ++-- packages/next/package.json | 2 +- pnpm-lock.yaml | 8 ++--- 4 files changed, 45 insertions(+), 45 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 39b51c929d3de..160aa967e74d4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -321,7 +321,7 @@ dependencies = [ [[package]] name = "auto-hash-map" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "serde", "smallvec", @@ -3111,7 +3111,7 @@ dependencies = [ [[package]] name = "node-file-trace" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "serde", @@ -6983,12 +6983,12 @@ dependencies = [ [[package]] name = "turbo-prehash" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" [[package]] name = "turbo-tasks" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "async-trait", @@ -7020,7 +7020,7 @@ dependencies = [ [[package]] name = "turbo-tasks-build" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "cargo-lock", @@ -7032,7 +7032,7 @@ dependencies = [ [[package]] name = "turbo-tasks-bytes" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "bytes", @@ -7046,7 +7046,7 @@ dependencies = [ [[package]] name = "turbo-tasks-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "dotenvs", @@ -7060,7 +7060,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fetch" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "lazy_static", @@ -7076,7 +7076,7 @@ dependencies = [ [[package]] name = "turbo-tasks-fs" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "auto-hash-map", @@ -7108,7 +7108,7 @@ dependencies = [ [[package]] name = "turbo-tasks-hash" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "md4", "turbo-tasks-macros", @@ -7118,7 +7118,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "proc-macro-error", @@ -7132,7 +7132,7 @@ dependencies = [ [[package]] name = "turbo-tasks-macros-shared" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "proc-macro2", "quote", @@ -7142,7 +7142,7 @@ dependencies = [ [[package]] name = "turbo-tasks-malloc" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "mimalloc", ] @@ -7150,7 +7150,7 @@ dependencies = [ [[package]] name = "turbo-tasks-memory" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "auto-hash-map", @@ -7177,7 +7177,7 @@ dependencies = [ [[package]] name = "turbopack" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "async-recursion", @@ -7207,7 +7207,7 @@ dependencies = [ [[package]] name = "turbopack-binding" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "auto-hash-map", "mdxjs", @@ -7248,7 +7248,7 @@ dependencies = [ [[package]] name = "turbopack-browser" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "indexmap 1.9.3", @@ -7271,7 +7271,7 @@ dependencies = [ [[package]] name = "turbopack-cli-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "clap", @@ -7288,7 +7288,7 @@ dependencies = [ [[package]] name = "turbopack-core" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "async-recursion", @@ -7317,7 +7317,7 @@ dependencies = [ [[package]] name = "turbopack-css" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "indexmap 1.9.3", @@ -7344,7 +7344,7 @@ dependencies = [ [[package]] name = "turbopack-dev-server" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "async-compression", @@ -7380,7 +7380,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "async-trait", @@ -7415,7 +7415,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-hmr-protocol" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "serde", "serde_json", @@ -7426,7 +7426,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-plugins" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "async-trait", @@ -7451,7 +7451,7 @@ dependencies = [ [[package]] name = "turbopack-ecmascript-runtime" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "indoc", @@ -7467,7 +7467,7 @@ dependencies = [ [[package]] name = "turbopack-env" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "indexmap 1.9.3", @@ -7483,7 +7483,7 @@ dependencies = [ [[package]] name = "turbopack-image" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "base64 0.21.4", @@ -7502,7 +7502,7 @@ dependencies = [ [[package]] name = "turbopack-json" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "serde", @@ -7517,7 +7517,7 @@ dependencies = [ [[package]] name = "turbopack-mdx" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "mdxjs", @@ -7532,7 +7532,7 @@ dependencies = [ [[package]] name = "turbopack-node" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "async-stream", @@ -7566,7 +7566,7 @@ dependencies = [ [[package]] name = "turbopack-nodejs" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "indexmap 1.9.3", @@ -7586,7 +7586,7 @@ dependencies = [ [[package]] name = "turbopack-resolve" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "indexmap 1.9.3", @@ -7604,7 +7604,7 @@ dependencies = [ [[package]] name = "turbopack-static" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "serde", @@ -7620,7 +7620,7 @@ dependencies = [ [[package]] name = "turbopack-swc-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "swc_core", "turbo-tasks", @@ -7631,7 +7631,7 @@ dependencies = [ [[package]] name = "turbopack-trace-server" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "either", @@ -7651,7 +7651,7 @@ dependencies = [ [[package]] name = "turbopack-trace-utils" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "crossbeam-channel", @@ -7667,7 +7667,7 @@ dependencies = [ [[package]] name = "turbopack-wasm" version = "0.1.0" -source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240617.2#0a45b48f36bcaa25164ac8371b8a2f7b9ef3fa1e" +source = "git+https://github.com/vercel/turbo.git?tag=turbopack-240619.2#3208478533b7e38b60253136513bf53f23755aa8" dependencies = [ "anyhow", "indexmap 1.9.3", diff --git a/Cargo.toml b/Cargo.toml index dbf764cbb4951..8fb0aed61d163 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,11 +38,11 @@ swc_core = { version = "0.95.2", features = [ testing = { version = "0.35.25" } # Turbo crates -turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240617.2" } +turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240619.2" } # [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros.. -turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240617.2" } +turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240619.2" } # [TODO]: need to refactor embed_directory! macro usage in next-core -turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240617.2" } +turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240619.2" } # General Deps diff --git a/packages/next/package.json b/packages/next/package.json index 9e67816e3e432..cf4bd6620e7e6 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -206,7 +206,7 @@ "@types/ws": "8.2.0", "@vercel/ncc": "0.34.0", "@vercel/nft": "0.27.1", - "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240617.2", + "@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240619.2", "acorn": "8.11.3", "amphtml-validator": "1.0.35", "anser": "1.4.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 472250c8f8430..40ae12e386449 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1105,8 +1105,8 @@ importers: specifier: 0.27.1 version: 0.27.1 '@vercel/turbopack-ecmascript-runtime': - specifier: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240617.2 - version: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240617.2' + specifier: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240619.2 + version: '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240619.2' acorn: specifier: 8.11.3 version: 8.11.3 @@ -26560,8 +26560,8 @@ packages: /zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} - '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240617.2': - resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240617.2} + '@gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240619.2': + resolution: {tarball: https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240619.2} name: '@vercel/turbopack-ecmascript-runtime' version: 0.0.0 dependencies: From dea86bb4de7a5c0d561a3e35e948d04c5bc91273 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Wed, 19 Jun 2024 14:32:35 +0200 Subject: [PATCH 2/3] Fix paths --- packages/next/src/build/create-compiler-aliases.ts | 5 +++-- .../react-dev-overlay/internal/helpers/use-websocket.ts | 2 +- packages/next/src/client/next-dev-turbopack.ts | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/next/src/build/create-compiler-aliases.ts b/packages/next/src/build/create-compiler-aliases.ts index 6c065b7874849..a21b804e22ecb 100644 --- a/packages/next/src/build/create-compiler-aliases.ts +++ b/packages/next/src/build/create-compiler-aliases.ts @@ -323,8 +323,9 @@ export function createRSCAliases( `next/dist/compiled/react-dom${bundledReactChannel}/profiling` } - alias['@vercel/turbopack-ecmascript-runtime/dev/client/hmr-client.ts'] = - `next/dist/client/dev/noop-turbopack-hmr` + alias[ + '@vercel/turbopack-ecmascript-runtime/browser/dev/client/hmr-client.ts' + ] = `next/dist/client/dev/noop-turbopack-hmr` return alias } diff --git a/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-websocket.ts b/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-websocket.ts index 21200c52ccac3..3261ce16ab9ba 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-websocket.ts +++ b/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-websocket.ts @@ -67,7 +67,7 @@ export function useTurbopack( import( // @ts-expect-error requires "moduleResolution": "node16" in tsconfig.json and not .ts extension - '@vercel/turbopack-ecmascript-runtime/dev/client/hmr-client.ts' + '@vercel/turbopack-ecmascript-runtime/browser/dev/client/hmr-client.ts' ).then(({ connect }) => { const { current } = turbopackState connect({ diff --git a/packages/next/src/client/next-dev-turbopack.ts b/packages/next/src/client/next-dev-turbopack.ts index aff50c7e48fed..2d7e3364eadbf 100644 --- a/packages/next/src/client/next-dev-turbopack.ts +++ b/packages/next/src/client/next-dev-turbopack.ts @@ -5,7 +5,7 @@ import initHMR from './dev/hot-middleware-client' import './setup-hydration-warning' import { pageBootrap } from './page-bootstrap' //@ts-expect-error requires "moduleResolution": "node16" in tsconfig.json and not .ts extension -import { connect } from '@vercel/turbopack-ecmascript-runtime/dev/client/hmr-client.ts' +import { connect } from '@vercel/turbopack-ecmascript-runtime/browser/dev/client/hmr-client.ts' import type { TurbopackMsgToBrowser } from '../server/dev/hot-reloader-types' window.next = { From fecfd5b923f8b6694905ed14d66903ef846ece8c Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Wed, 19 Jun 2024 14:40:37 +0200 Subject: [PATCH 3/3] Update path --- packages/next/src/build/create-compiler-aliases.ts | 2 +- .../react-dev-overlay/internal/helpers/use-websocket.ts | 2 +- packages/next/src/client/next-dev-turbopack.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/next/src/build/create-compiler-aliases.ts b/packages/next/src/build/create-compiler-aliases.ts index a21b804e22ecb..03846c9b352fc 100644 --- a/packages/next/src/build/create-compiler-aliases.ts +++ b/packages/next/src/build/create-compiler-aliases.ts @@ -324,7 +324,7 @@ export function createRSCAliases( } alias[ - '@vercel/turbopack-ecmascript-runtime/browser/dev/client/hmr-client.ts' + '@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts' ] = `next/dist/client/dev/noop-turbopack-hmr` return alias diff --git a/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-websocket.ts b/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-websocket.ts index 3261ce16ab9ba..f428bfb40021d 100644 --- a/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-websocket.ts +++ b/packages/next/src/client/components/react-dev-overlay/internal/helpers/use-websocket.ts @@ -67,7 +67,7 @@ export function useTurbopack( import( // @ts-expect-error requires "moduleResolution": "node16" in tsconfig.json and not .ts extension - '@vercel/turbopack-ecmascript-runtime/browser/dev/client/hmr-client.ts' + '@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts' ).then(({ connect }) => { const { current } = turbopackState connect({ diff --git a/packages/next/src/client/next-dev-turbopack.ts b/packages/next/src/client/next-dev-turbopack.ts index 2d7e3364eadbf..c3d6712d4c6b5 100644 --- a/packages/next/src/client/next-dev-turbopack.ts +++ b/packages/next/src/client/next-dev-turbopack.ts @@ -5,7 +5,7 @@ import initHMR from './dev/hot-middleware-client' import './setup-hydration-warning' import { pageBootrap } from './page-bootstrap' //@ts-expect-error requires "moduleResolution": "node16" in tsconfig.json and not .ts extension -import { connect } from '@vercel/turbopack-ecmascript-runtime/browser/dev/client/hmr-client.ts' +import { connect } from '@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts' import type { TurbopackMsgToBrowser } from '../server/dev/hot-reloader-types' window.next = {