Closed
Description
Environment
Vite, Remix
Steps to Reproduce
- Install
@sentry/vite-plugin
to send source maps and release notifications from CI/CD to Sentry - Intentionally do not store a Sentry auth token locally, only on CI/CD
- Install Knip, a tool to find unused code
- Run Knip with
npx knip --reporter json | jq .
Expected Result
Knip writes valid JSON to stdout. Any output from Knip would go to stderr not stdout because it is not the primary output of the execution.
Actual Result
Sentry sends the following warning to stdout:
[sentry-vite-plugin] Warning: No auth token provided. Will not upload source maps. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/
As a result of this warning going to stdout, the output from knip
is invalid JSON.
Thoughts
- I am operating under the assumption that it is reasonable for us to only use a Sentry token in CI/CD, and not use one locally. Is that reasonable?
- Perhaps there is a way to explicitly tell the Vite plugin that it should not be trying to upload source maps, so it can understand there is no need for the warning
- Given that there are any number of log lines / warnings that the vite plugin could potentially emit, could the vite plugin logger be set to log to stderr instead of stdout?
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status