Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
1b4c76c5
Commit
1b4c76c5
authored
Dec 30, 2025
by
Luke Sandberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more comments
parent
0a59e8c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
module.rs
...ck/crates/turbopack-ecmascript/src/worker_chunk/module.rs
+9
-4
No files found.
turbopack/crates/turbopack-ecmascript/src/worker_chunk/module.rs
View file @
1b4c76c5
...
...
@@ -70,10 +70,15 @@ impl Module for WorkerLoaderModule {
impl
Asset
for
WorkerLoaderModule
{
#[turbo_tasks
::
function]
fn
content
(
&
self
)
->
Vc
<
AssetContent
>
{
// Delegate to the inner module's content for tools like node-file-trace
// that need to emit the actual worker file. This wont be called during actual chunking
// A better solution might be to produce these loaders during chunking (like
// AsyncModuleLoaders). This would require a better understanding of isolated entry points.
// For content(), we delegate to the inner module because:
// 1. During normal chunking/bundling, content() is not called - instead the chunk item's
// code_generation() is used, which generates the worker loader code
// 2. During tracing (e.g. node-file-trace), content() is called to emit all referenced
// files, and we want to include the actual worker file, not a synthetic loader
// 3. This follows the same pattern as other transform modules:
// - TracedAsset: delegates to inner module (explicit tracing wrapper)
// - EcmascriptModulePartAsset: delegates to full module (tree-shaking wrapper)
// - CachedExternalModule: returns NotFound (build-time only, no source to trace)
self
.inner
.content
()
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment