fix(webpack): fix check for standardWebpackConfigFunction (#20728)

This commit is contained in:
Jack Hsu 2023-12-12 12:59:06 -05:00 committed by GitHub
parent d9540ef7cd
commit 3655269411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -83,8 +83,8 @@ export async function* devServerExecutor(
// Otherwise, user should define `devServer` option directly in their webpack config.
if (
typeof userDefinedWebpackConfig === 'function' &&
isNxWebpackComposablePlugin(userDefinedWebpackConfig) &&
!buildOptions.standardWebpackConfigFunction
(isNxWebpackComposablePlugin(userDefinedWebpackConfig) ||
!buildOptions.standardWebpackConfigFunction)
) {
config = await userDefinedWebpackConfig(
{ devServer },

View File

@ -60,8 +60,8 @@ async function getWebpackConfigs(
if (
typeof userDefinedWebpackConfig === 'function' &&
isNxWebpackComposablePlugin(userDefinedWebpackConfig) &&
!options.standardWebpackConfigFunction
(isNxWebpackComposablePlugin(userDefinedWebpackConfig) ||
!options.standardWebpackConfigFunction)
) {
// Old behavior, call the Nx-specific webpack config function that user exports
return await userDefinedWebpackConfig(config, {