fix(binding): preserve function-valued chunk filename templates - #15375
fix(binding): preserve function-valued chunk filename templates#15375SyMind wants to merge 1 commit into
Conversation
|
@codex review |
Deploying rspack with
|
| Latest commit: |
3037d67
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://91eb63f6.rspack-v2.pages.dev |
| Branch Preview URL: | https://chunk-filename-template-func.rspack-v2.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3037d677df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if let Some(manager) = CompilerScopedFilenameTsFnManager::current_context() { | ||
| let function_ref = JsFilenameFunctionRef::from_napi_value(env, napi_val)?; | ||
| manager.register(Arc::downgrade(&filename_fn), function_ref); | ||
| } |
There was a problem hiding this comment.
Register filename functions returned by dynamic entries
When entry is a function and its eventual RawEntryDynamicResult.options.filename is function-valued, JsFilename::from_napi_value runs while converting the promise result in raw_dynamic_entry.rs, after the constructor-time manager scope has ended. Consequently current_context() is None, no function reference is registered, and the resulting chunk's filenameTemplate getter returns undefined instead of the original function even though that function controls the emitted filename. The filename manager must also be propagated through conversion of dynamic-entry callback results.
Useful? React with 👍 / 👎.
📦 Binary Size-limit
❌ Size increased by 8.00KB from 68.24MB to 68.24MB (⬆️0.01%) |
Rsdoctor Bundle Diff AnalysisFound 5 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
Chunk.filenameTemplatewhile preserving existing string andundefinedbehavior.addEntry, andaddInclude, with updated types, documentation, and integration coverage.Related links
Checklist