Skip to content

Commit

Permalink
fix(webpack): fixed isolatedConfig: false option not composing plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
TriPSs authored and jaysoo committed Dec 11, 2023
1 parent dbeaf92 commit cc2e0e3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/webpack/src/executors/webpack/webpack.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import type {
} from './schema';
import { normalizeOptions } from './lib/normalize-options';
import {
composePlugins,
composePluginsSync,
isNxWebpackComposablePlugin,
} from '../../utils/config';
import { withNx } from '../../utils/with-nx';
Expand Down Expand Up @@ -54,7 +54,12 @@ async function getWebpackConfigs(

const config = options.isolatedConfig
? {}
: composePlugins(withNx(options), withWeb(options));
: (options.target === 'web'
? composePluginsSync(withNx(options), withWeb(options))
: withNx(options))(
{},
{ options, context }
);

if (isNxWebpackComposablePlugin(userDefinedWebpackConfig)) {
// Old behavior, call the Nx-specific webpack config function that user exports
Expand Down

0 comments on commit cc2e0e3

Please sign in to comment.