mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-21 21:25:11 +00:00
fix(nuxt): unpause dom updates on error (#22945)
This commit is contained in:
parent
559a72370b
commit
4e05650cde
@ -27,6 +27,8 @@ export default defineNuxtPlugin({
|
||||
nuxtApp.hooks.hook('page:start', () => { pauseDOMUpdates = true })
|
||||
// wait for new page before unpausing dom updates (triggered after suspense resolved)
|
||||
nuxtApp.hooks.hook('page:finish', syncHead)
|
||||
// unpause on error
|
||||
nuxtApp.hooks.hook('app:error', syncHead)
|
||||
// unpause the DOM once the mount suspense is resolved
|
||||
nuxtApp.hooks.hook('app:suspense:resolve', syncHead)
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ describe.skipIf(process.env.SKIP_BUNDLE_SIZE === 'true' || process.env.ECOSYSTEM
|
||||
for (const outputDir of ['.output', '.output-inline']) {
|
||||
it('default client bundle size', async () => {
|
||||
const clientStats = await analyzeSizes('**/*.js', join(rootDir, outputDir, 'public'))
|
||||
expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"96.9k"')
|
||||
expect.soft(roundToKilobytes(clientStats.totalBytes)).toMatchInlineSnapshot('"97.0k"')
|
||||
expect(clientStats.files.map(f => f.replace(/\..*\.js/, '.js'))).toMatchInlineSnapshot(`
|
||||
[
|
||||
"_nuxt/entry.js",
|
||||
|
Loading…
Reference in New Issue
Block a user