Skip to content

Commit

Permalink
fix(vite): ensure cache is created correctly for separate vite and vi…
Browse files Browse the repository at this point in the history
…test config files #22244
  • Loading branch information
Coly010 committed Apr 2, 2024
1 parent 1a82dd2 commit 1a90a05
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/vite/src/plugins/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ export const createNodes: CreateNodes<VitePluginOptions> = [

options = normalizeOptions(options);

const hash = calculateHashForCreateNodes(projectRoot, options, context, [
getLockFileName(detectPackageManager(context.workspaceRoot)),
]);
const hash =
calculateHashForCreateNodes(projectRoot, options, context, [
getLockFileName(detectPackageManager(context.workspaceRoot)),
]) + configFilePath;
const targets = targetsCache[hash]
? targetsCache[hash]
: await buildViteTargets(configFilePath, projectRoot, options, context);
Expand Down

0 comments on commit 1a90a05

Please sign in to comment.