fix(webpack): fixed isolatedConfig: false option not composing plugins (#20678)
This commit is contained in:
parent
2eac338041
commit
38ad952713
@ -23,7 +23,7 @@ import type {
|
|||||||
} from './schema';
|
} from './schema';
|
||||||
import { normalizeOptions } from './lib/normalize-options';
|
import { normalizeOptions } from './lib/normalize-options';
|
||||||
import {
|
import {
|
||||||
composePlugins,
|
composePluginsSync,
|
||||||
isNxWebpackComposablePlugin,
|
isNxWebpackComposablePlugin,
|
||||||
} from '../../utils/config';
|
} from '../../utils/config';
|
||||||
import { withNx } from '../../utils/with-nx';
|
import { withNx } from '../../utils/with-nx';
|
||||||
@ -54,7 +54,9 @@ async function getWebpackConfigs(
|
|||||||
|
|
||||||
const config = options.isolatedConfig
|
const config = options.isolatedConfig
|
||||||
? {}
|
? {}
|
||||||
: composePlugins(withNx(options), withWeb(options));
|
: (options.target === 'web'
|
||||||
|
? composePluginsSync(withNx(options), withWeb(options))
|
||||||
|
: withNx(options))({}, { options, context });
|
||||||
|
|
||||||
if (isNxWebpackComposablePlugin(userDefinedWebpackConfig)) {
|
if (isNxWebpackComposablePlugin(userDefinedWebpackConfig)) {
|
||||||
// Old behavior, call the Nx-specific webpack config function that user exports
|
// Old behavior, call the Nx-specific webpack config function that user exports
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user