diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index cb9927a9d5da..a42abcae003e 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -1565,7 +1565,7 @@ export default async function getBaseWebpackConfig( }, } - if (!isServer) { + if (targetWeb) { webpack5Config.output!.enabledLibraryTypes = ['assign'] }