rsnext/test/e2e/app-dir/next-config/next.config.js
Shu Ding b7e2627422
Avoid loading Next.js config again in render workers (#52587)
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.
2023-07-12 11:21:05 +00:00

11 lines
207 B
JavaScript

// This should work
console.log(require('webpack').sources.RawSource)
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config) {
return config
},
}
module.exports = nextConfig