Skip to content
Source
Sign inSign up
TanStack/router

fix(start-plugin-core): restore Rsbuild import-protection mocks from persistent cache #8798

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

Showing 10 changed files with 137 additions and 26 deletions (loading 7).

x
0 of 10 viewed, 10 left
5 additions and 0 deletions.changeset/rsbuild-import-protection-persistent-cache.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/start-plugin-core': patch
+---
+​
+Fix Rsbuild import protection failing to resolve its mock modules when Rspack's persistent cache restores the modules that import them.
113 additions and 1 deletione2e/react-start/import-protection/tests/import-protection.spec.tsModified
View file
@@ -1,10 +1,15 @@
import path from 'node:path'
import fs from 'node:fs'
+import os from 'node:os'
import { expect } from '@playwright/test'
import { test } from '@tanstack/router-e2e-utils'
-import { getViolationArtifactName } from './violations.utils'
+import {
+ extractViolationsFromLog,
+ 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, '..')