Unverified Commit ebddbf1b authored by Shu Ding's avatar Shu Ding Committed by GitHub

Add test case for #48583 and ignore hot-update scripts (#48587)

Add a test case for #48583.
parent acd3b25e
......@@ -263,6 +263,8 @@ export class ClientReferenceManifestPlugin {
// It's possible that a chunk also emits CSS files, that will
// be handled separatedly.
if (!file.endsWith('.js')) return null
if (file.endsWith('.hot-update.js')) return null
return requiredChunk.id + ':' + file
})
})
......
'use client'
export default function () {
return <h1>hello</h1>
}
// This file is needed for the test, to ensure that the "comp.js" module is
// created as a dynamic import chunk.
'use client'
export default function Page() {
import('./comp').then((m) => {
console.log(m)
})
return null
}
import Comp from '../comp'
export default function Page() {
return <Comp />
}
......@@ -52,5 +52,10 @@ createNextDescribe(
await browser.elementByCss('#css-text-dynamic-no-ssr-client').text()
).toBe('next-dynamic dynamic no ssr on client:suffix')
})
it('should generate correct client manifest for dynamic chunks', async () => {
const $ = await next.render$('/chunk-loading/server')
expect($('h1').text()).toBe('hello')
})
}
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment