Skip to content

Commit

Permalink
fix(core): reenable isolation on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed Aug 6, 2024
1 parent df38870 commit 35a33ae
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions packages/nx/src/project-graph/plugins/internal-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,32 @@ export const nxPluginCache: Map<
[Promise<LoadedNxPlugin>, () => void]
> = new Map();

function isIsolationEnabled() {
// Explicitly enabled, regardless of further conditions
if (process.env.NX_ISOLATE_PLUGINS === 'true') {
return true;
}
if (
// Explicitly disabled
process.env.NX_ISOLATE_PLUGINS === 'false' ||
// Isolation is disabled on WASM builds currently.
IS_WASM
) {
return false;
}
// Default value
return true;
}

export async function loadNxPlugins(
plugins: PluginConfiguration[],
root = workspaceRoot
): Promise<readonly [LoadedNxPlugin[], () => void]> {
performance.mark('loadNxPlugins:start');

const loadingMethod =
process.env.NX_ISOLATE_PLUGINS === 'true' ||
(!IS_WASM &&
platform() !== 'win32' &&
process.env.NX_ISOLATE_PLUGINS !== 'false')
? loadNxPluginInIsolation
: loadNxPlugin;
const loadingMethod = isIsolationEnabled()
? loadNxPluginInIsolation
: loadNxPlugin;

plugins = await normalizePlugins(plugins, root);

Expand Down

0 comments on commit 35a33ae

Please sign in to comment.