diff --git a/nx.json b/nx.json index f20e737d..fdaaabd5 100644 --- a/nx.json +++ b/nx.json @@ -28,6 +28,9 @@ "cache": true, "inputs": ["default", "^production"] }, + "pb-ve-env-setup": { + "cache": true + }, "nx-release-publish": { "dependsOn": [ { diff --git a/projects/nx-verdaccio-env/src/plugin/nx-verdaccio-env.plugin.ts b/projects/nx-verdaccio-env/src/plugin/nx-verdaccio-env.plugin.ts index aa9895d9..9a4ec127 100644 --- a/projects/nx-verdaccio-env/src/plugin/nx-verdaccio-env.plugin.ts +++ b/projects/nx-verdaccio-env/src/plugin/nx-verdaccio-env.plugin.ts @@ -30,7 +30,7 @@ const PROJECT_JSON_FILE_GLOB = '**/project.json'; export const createNodesV2: CreateNodesV2 = [ PROJECT_JSON_FILE_GLOB, async (configFiles, options, context) => { - const optionsHash = hashObject({ configFiles, options }); + const optionsHash = hashObject({ options }); const nxVerdaccioEnvPluginCachePath = join( workspaceDataDirectory, `push-based--${PLUGIN_NAME}-${optionsHash}.hash` @@ -45,7 +45,6 @@ export const createNodesV2: CreateNodesV2 = [ const projectRoot = dirname(projectConfigurationFile); const hashData = { projectRoot, - projectConfigurationFile, internalOptions, }; if ( diff --git a/projects/nx-verdaccio-env/src/plugin/targets/environment.targets.ts b/projects/nx-verdaccio-env/src/plugin/targets/environment.targets.ts index 518cba5e..3b7c8c96 100644 --- a/projects/nx-verdaccio-env/src/plugin/targets/environment.targets.ts +++ b/projects/nx-verdaccio-env/src/plugin/targets/environment.targets.ts @@ -114,8 +114,13 @@ export function getEnvTargets( }, // runs env-bootstrap-env, install-env and stop-verdaccio [TARGET_ENVIRONMENT_SETUP]: { - outputs: ['{options.environmentRoot}'], - cache: false, + outputs: [ + '{options.environmentRoot}/node_modules', + '{options.environmentRoot}/package.json', + '{options.environmentRoot}/.npmrc', + '{options.environmentRoot}/package-lock.json', + ], + cache: false, // # @TODO enable by default after more research on cache size is done executor: `${PACKAGE_NAME}:${EXECUTOR_ENVIRONMENT_SETUP}`, options: { environmentRoot,