Unverified Commit ae7ab812 authored by Sam Poder's avatar Sam Poder Committed by GitHub

[turbopack] Rename the edge runtime to the self-contained runtime (#94726)

This isn't really a functionality change but it makes later PRs up the
stack make more sense. At this point though it's just a name change.
parent e383590a
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
"check:browser-dev-client": "tsc -p src/browser/dev/hmr-client", "check:browser-dev-client": "tsc -p src/browser/dev/hmr-client",
"check:browser-runtime-base": "tsc -p src/browser/runtime/base", "check:browser-runtime-base": "tsc -p src/browser/runtime/base",
"check:browser-runtime-dom": "tsc -p src/browser/runtime/dom", "check:browser-runtime-dom": "tsc -p src/browser/runtime/dom",
"check:browser-runtime-edge": "tsc -p src/browser/runtime/edge" "check:browser-runtime-self-contained": "tsc -p src/browser/runtime/self-contained"
}, },
"exports": { "exports": {
".": "./src/main.js", ".": "./src/main.js",
......
/** /**
* This file contains the runtime code specific to the Turbopack development * This file contains the development-mode runtime code specific to the
* ECMAScript "None" runtime (e.g. for Edge). * Turbopack self-contained ECMAScript runtime (no runtime chunk loading,
* `globalThis`/`self` only, no DOM). Used for the Edge execution environment
* and for single-chunk (service-worker) bundles.
* *
* It will be appended to the base development runtime code. * It will be appended to the base development runtime code.
*/ */
......
/** /**
* This file contains the runtime code specific to the Turbopack development * This file contains the runtime code specific to the Turbopack self-contained
* ECMAScript "None" runtime (e.g. for Edge). * ECMAScript runtime: a backend that performs no runtime chunk loading and
* registers chunks only via `globalThis`/`self` (no DOM). It is used both for
* the Edge execution environment and for single-chunk (service-worker) bundles,
* where everything is inlined into one file.
* *
* It will be appended to the base development runtime code. * It will be appended to the base runtime code.
*/ */
/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-unused-vars */
......
...@@ -59,11 +59,14 @@ pub async fn get_browser_runtime_code( ...@@ -59,11 +59,14 @@ pub async fn get_browser_runtime_code(
let mut runtime_backend_code = vec![]; let mut runtime_backend_code = vec![];
match (chunk_loading, runtime_type) { match (chunk_loading, runtime_type) {
(ChunkLoading::Edge, RuntimeType::Development) => { (ChunkLoading::Edge, RuntimeType::Development) => {
runtime_backend_code.push("browser/runtime/edge/runtime-backend-edge.ts"); runtime_backend_code
runtime_backend_code.push("browser/runtime/edge/dev-backend-edge.ts"); .push("browser/runtime/self-contained/runtime-backend-self-contained.ts");
runtime_backend_code
.push("browser/runtime/self-contained/dev-backend-self-contained.ts");
} }
(ChunkLoading::Edge, RuntimeType::Production) => { (ChunkLoading::Edge, RuntimeType::Production) => {
runtime_backend_code.push("browser/runtime/edge/runtime-backend-edge.ts"); runtime_backend_code
.push("browser/runtime/self-contained/runtime-backend-self-contained.ts");
} }
// This case should never be hit. // This case should never be hit.
(ChunkLoading::NodeJs, _) => { (ChunkLoading::NodeJs, _) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment