From 4702356395f07f01618c067ada719d84087bbc64 Mon Sep 17 00:00:00 2001 From: Jack Hsu Date: Wed, 26 Jun 2024 13:27:20 -0400 Subject: [PATCH] fix(vue): respect useInferencePlugin in nx.json when generating apps --- packages/vue/src/generators/application/application.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/vue/src/generators/application/application.ts b/packages/vue/src/generators/application/application.ts index f6efb1b7f944ee..9087a6a4e143a3 100644 --- a/packages/vue/src/generators/application/application.ts +++ b/packages/vue/src/generators/application/application.ts @@ -2,6 +2,7 @@ import { addProjectConfiguration, formatFiles, GeneratorCallback, + readNxJson, runTasksInSerial, toJS, Tree, @@ -28,7 +29,11 @@ export async function applicationGeneratorInternal( _options: Schema ): Promise { const options = await normalizeOptions(tree, _options); - options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false'; + const nxJson = readNxJson(tree); + + options.addPlugin ??= + process.env.NX_ADD_PLUGINS !== 'false' && + nxJson.useInferencePlugins !== false; const tasks: GeneratorCallback[] = [];