diff --git a/packages/webpack/src/executors/dev-server/dev-server.impl.ts b/packages/webpack/src/executors/dev-server/dev-server.impl.ts index 1256c304b97cb..0e33e323bb42e 100644 --- a/packages/webpack/src/executors/dev-server/dev-server.impl.ts +++ b/packages/webpack/src/executors/dev-server/dev-server.impl.ts @@ -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 }, diff --git a/packages/webpack/src/executors/webpack/webpack.impl.ts b/packages/webpack/src/executors/webpack/webpack.impl.ts index 3d060bc830942..9e44337fd8707 100644 --- a/packages/webpack/src/executors/webpack/webpack.impl.ts +++ b/packages/webpack/src/executors/webpack/webpack.impl.ts @@ -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, {