Unverified Commit 2ede8356 authored by Shu Ding's avatar Shu Ding Committed by GitHub

Remove redundant condition (#51070)

This review comment was sent after merging the PR: https://github.com/vercel/next.js/pull/51067#discussion_r1224745071

The layer condition doesn't do anything if `hasServerComponents` is disabled.
parent 41d92fe3
......@@ -903,10 +903,7 @@ export default async function getBaseWebpackConfig(
// for middleware to tree shake the unused default optimized imports like "next/server".
// This will cause some performance overhead but
// acceptable as Babel will not be recommended.
[
getSwcLoader({ hasServerComponents: false, isServerLayer: false }),
getBabelLoader(),
]
[getSwcLoader({ hasServerComponents: false }), getBabelLoader()]
// Loader for API routes needs to be differently configured as it shouldn't
// have RSC transpiler enabled, so syntax checks such as invalid imports won't
......
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