-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently we ship dev runtimes (with things like HMR logic) along with code for loading chunks. This separates them and allows us to include a minimal runtime for builds. Test Plan: `TURBOPACK=1 TURBOPACK_BUILD=1 pnpm build` on an app with a `middleware.ts` and verified it loads when started.
- Loading branch information
1 parent
05bcd01
commit c843b57
Showing
13 changed files
with
1,082 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/base/dummy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* This file acts as a dummy implementor for the interface that | ||
* `runtime-base.ts` expects to be available in the global scope. | ||
* | ||
* This interface will be implemented by runtime backends. | ||
*/ | ||
|
||
/* eslint-disable @typescript-eslint/no-unused-vars */ | ||
|
||
/// <reference path="../../../shared/runtime-utils.ts" /> | ||
/// <reference path="../../../shared/require-type.d.ts" /> | ||
|
||
declare var BACKEND: RuntimeBackend; | ||
declare var loadWebAssembly: ( | ||
source: SourceInfo, | ||
wasmChunkPath: ChunkPath, | ||
imports: WebAssembly.Imports | ||
) => Exports; | ||
declare var loadWebAssemblyModule: ( | ||
source: SourceInfo, | ||
wasmChunkPath: ChunkPath | ||
) => WebAssembly.Module; | ||
declare var relativeURL: (inputUrl: string) => void; |
Oops, something went wrong.