Skip to content
Source
Sign inSign up
TanStack/router

perf(start-plugin-core): scan only rebuilt modules for Rsbuild import protection in dev #8801

Openmattcosta7(GitHub profile, opens in a new tab)wants to merge 7 commits intomain fromrefs/pull/8801/headopened

Showing 7 changed files with 203 additions and 1 deletion (loading 5).

x
0 of 7 viewed, 7 left
5 additions and 0 deletions.changeset/rsbuild-incremental-import-protection.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/start-plugin-core': patch
+---
+​
+Speed up Rsbuild import protection. Scans read the imports of only those modules that can report a violation, skip violations that were already reported, and development rebuilds check only rebuilt modules and their importers.
198 additions and 1 deletione2e/react-start/import-protection/tests/import-protection.spec.tsModified
View file
@@ -1,10 +1,11 @@
import path from 'node:path'
import fs from 'node:fs'
import { expect } from '@playwright/test'
-import { test } from '@tanstack/router-e2e-utils'
+import { createHmrFileEditor, test } from '@tanstack/router-e2e-utils'
import { getViolationArtifactName } from './violations.utils'
import type { Violation } from './violations.utils'
import type { Page } from '@playwright/test'
+import type { RsbuildPlugin } from '@rsbuild/core'
​
const toolchain = process.env.E2E_TOOLCHAIN ?? 'vite'
const fixtureRoot = path.resolve(import.meta.dirname, '..')
@@ -137,6 +138,185 @@
​