Skip to content

Commit cf1102b

Browse files
committed
fix: ignored hmr soft invalidate
1 parent 9d26977 commit cf1102b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

playground/hmr/__tests__/hmr.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,9 @@ if (!isBuild) {
217217
)
218218
})
219219

220+
// The file will be transformed twice at rolldown hmr and rebuild.
221+
// It is a performance improvement at vite, it should be ignored at rolldown-vite full bundle mode.
222+
// Other, not sure why the times is 10, but using the client to check the times is 2.
220223
if (!process.env.VITE_TEST_FULL_BUNDLE_MODE) {
221224
test('soft invalidate', async () => {
222225
const el = await page.$('.soft-invalidation')
@@ -242,7 +245,9 @@ if (!isBuild) {
242245
'soft-invalidation/index.js is transformed 2 times. child is now updated?',
243246
)
244247
})
248+
}
245249

250+
if (!process.env.VITE_TEST_FULL_BUNDLE_MODE) {
246251
test('invalidate in circular dep should not trigger infinite HMR', async () => {
247252
const el = await page.$('.invalidation-circular-deps')
248253
await untilUpdated(() => el.textContent(), 'child')

0 commit comments

Comments
 (0)