Skip to content
Source
Sign inSign up
TanStack/router

perf(compiler): edit the analyzed module instead of copying it for each output #8675

OpenSheraff(GitHub profile, opens in a new tab)wants to merge 6 commits intocodex/yuku-evaluation fromperf/copy-free-outputsopened

Showing 19 changed files with 8 additions and 2 deletions (loading 17).

x
0 of 19 viewed, 19 left
7 additions and 0 deletions.changeset/copy-free-compiler-outputs.mdAdded
View file
@@ -0,0 +1,7 @@
+---
+'@tanstack/router-utils': patch
+'@tanstack/router-plugin': patch
+'@tanstack/start-plugin-core': patch
+---
+​
+Route code splitting, Hydrate virtual modules and the import protection rewrite edit the analyzed module instead of copying it first, which makes builds faster.
1 addition and 2 deletionspackages/router-plugin/src/core/code-splitter/plugins/react-refresh-route-components.tsModified
View file
@@ -57,8 +57,7 @@
continue
​
- const original = ctx.originalNodes.get(prop.value)
- const binding = original ? ctx.module.bindingOf(original) : null
+ const binding = ctx.module.bindingOf(prop.value)
if (binding && ctx.opts.sharedBindings?.has(binding.name)) {
continue
packages/router-plugin/src/core/code-splitter/compilers.tsModified
View file
Loading the diff