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): allow force ignore of logs from nxViteTsPaths plugin #29320 #30200

Merged
merged 3 commits into from
Feb 27, 2025
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
5 changes: 3 additions & 2 deletions packages/vite/plugins/nx-tsconfig-paths.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import { isUsingTsSolutionSetup } from '@nx/js/src/utils/typescript/ts-solution-
export interface nxViteTsPathsOptions {
/**
* Enable debug logging
* @default false
* If set to false, it will always ignore the debug logging even when `--verbose` or `NX_VERBOSE_LOGGING` is set to true.
* @default undefined
**/
debug?: boolean;
/**
Expand Down Expand Up @@ -223,7 +224,7 @@ export function nxViteTsPaths(options: nxViteTsPathsOptions = {}) {
}

function logIt(...msg: any[]) {
if (process.env.NX_VERBOSE_LOGGING === 'true' || options?.debug) {
if (process.env.NX_VERBOSE_LOGGING === 'true' && options?.debug !== false) {
console.debug('\n[Nx Vite TsPaths]', ...msg);
}
}
Expand Down