mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +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))) {
|
||||
return true
|
||||
}
|
||||
return isVue(id, { type: ['template'] })
|
||||
return isVue(id)
|
||||
},
|
||||
transform (code, id) {
|
||||
if (!CLIENT_FALLBACK_RE.test(code)) { return }
|
||||
|
@ -343,7 +343,8 @@ describe('pages', () => {
|
||||
// ensure components reactivity once mounted
|
||||
await page.locator('#increment-count').click()
|
||||
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()
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user