Skip to content

Commit

Permalink
fix(webpack): fix check for standardWebpackConfigFunction (#20728)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoo committed Dec 12, 2023
1 parent 84c3fd6 commit 7f53f99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/webpack/src/executors/dev-server/dev-server.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
4 changes: 2 additions & 2 deletions packages/webpack/src/executors/webpack/webpack.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down

0 comments on commit 7f53f99

Please sign in to comment.