mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-29 09:02:03 +00:00
fix(nuxt): transform client fallbacks directly on SFCs (#20835)
This commit is contained in:
parent
6a052b583b
commit
900ee6dc8b
@ -25,7 +25,7 @@ export const clientFallbackAutoIdPlugin = createUnplugin((options: LoaderOptions
|
|||||||
if (include.some(pattern => id.match(pattern))) {
|
if (include.some(pattern => id.match(pattern))) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return isVue(id, { type: ['template'] })
|
return isVue(id)
|
||||||
},
|
},
|
||||||
transform (code, id) {
|
transform (code, id) {
|
||||||
if (!CLIENT_FALLBACK_RE.test(code)) { return }
|
if (!CLIENT_FALLBACK_RE.test(code)) { return }
|
||||||
|
@ -343,7 +343,8 @@ describe('pages', () => {
|
|||||||
// ensure components reactivity once mounted
|
// ensure components reactivity once mounted
|
||||||
await page.locator('#increment-count').click()
|
await page.locator('#increment-count').click()
|
||||||
expect(await page.locator('#sugar-counter').innerHTML()).toContain('Sugar Counter 12 x 1 = 12')
|
expect(await page.locator('#sugar-counter').innerHTML()).toContain('Sugar Counter 12 x 1 = 12')
|
||||||
|
// #20833
|
||||||
|
expect(await page.locator('body').innerHTML()).not.toContain('Hello world !')
|
||||||
await page.close()
|
await page.close()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user