fix(webpack): fixed isolatedConfig: false option not composing plugins (#20678)

This commit is contained in:
Tycho Bokdam 2023-12-11 22:23:20 +01:00 committed by GitHub
parent 2eac338041
commit 38ad952713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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';
@ -54,7 +54,9 @@ 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