Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vite): nxViteTsPaths plugin should not run-many for vitest #26574

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/vite/plugins/nx-tsconfig-paths.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ export function nxViteTsPaths(options: nxViteTsPathsOptions = {}) {
There should at least be a tsconfig.base.json or tsconfig.json in the root of the workspace ${workspaceRoot}`);
}

if (!options.buildLibsFromSource && !global.NX_GRAPH_CREATION) {
if (
!options.buildLibsFromSource &&
!global.NX_GRAPH_CREATION &&
config.mode !== 'test'
) {
const projectGraph = await createProjectGraphAsync({
exitOnError: false,
resetDaemonClient: true,
Expand Down Expand Up @@ -123,7 +127,7 @@ There should at least be a tsconfig.base.json or tsconfig.json in the root of th

logIt('first parsed tsconfig: ', parsed);
if (parsed.resultType === 'failed') {
throw new Error(`Failed loading tsonfig at ${foundTsConfigPath}`);
throw new Error(`Failed loading tsconfig at ${foundTsConfigPath}`);
}
tsConfigPathsEsm = parsed;

Expand Down