fix(core): disable isolation in wasm (#26960)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

Something is causing plugin isolation to fail on wasm environments.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

Plugin isolation is disabled on wasm environments pending a fix.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
This commit is contained in:
Jason Jean 2024-07-16 18:12:46 -05:00 committed by GitHub
parent ccb0d7d244
commit 039f91dde4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,6 +28,7 @@ import {
AggregateCreateNodesError,
isAggregateCreateNodesError,
} from '../error-types';
import { IS_WASM } from '../../native';
export class LoadedNxPlugin {
readonly name: string;
@ -151,7 +152,8 @@ export async function loadNxPlugins(
performance.mark('loadNxPlugins:start');
const loadingMethod =
process.env.NX_ISOLATE_PLUGINS !== 'false'
process.env.NX_ISOLATE_PLUGINS === 'true' ||
(!IS_WASM && process.env.NX_ISOLATE_PLUGINS !== 'false')
? loadNxPluginInIsolation
: loadNxPlugin;