mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This PR ensures that both Webpack and the config won't be initiated in render workers. This is great for performance but also avoids potential issues (e.g. Next.js plugin with side effects). Instead, we pass a serialized config from the router worker to the render workers. Closes #52366.
16 lines
373 B
TypeScript
16 lines
373 B
TypeScript
import { createNextDescribe } from 'e2e-utils'
|
|
|
|
createNextDescribe(
|
|
'app dir - next config',
|
|
{
|
|
files: __dirname,
|
|
},
|
|
({ next }) => {
|
|
// https://github.com/vercel/next.js/issues/52366
|
|
it('should support importing webpack in next.config', async () => {
|
|
const html = await next.render('/')
|
|
expect(html).toContain('hello from page')
|
|
})
|
|
}
|
|
)
|