Skip to content

Conversation

mydea
Copy link
Member

@mydea mydea commented Aug 4, 2025

This streamlines astro build logs in two ways:

  1. Guard all logs (except the deprecation warning) behind debug: true
  2. Use the astro logger instead of console.log everywhere. This automatically prepends the message with @sentry/astro, so no need for our own prefix there - see https://docs.astro.build/en/reference/integrations-reference/#astrointegrationlogger
  3. If sourceMaps: false is explicitly set by a user, we always show a short warning, and a longer warning with more context when debug: true

@mydea mydea requested review from Lms24 and s1gr1d August 4, 2025 11:19
@mydea mydea self-assigned this Aug 4, 2025
cursor[bot]

This comment was marked as outdated.

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this PR supposed to contain React Router and SolidStart changes as well?

@mydea
Copy link
Member Author

mydea commented Aug 4, 2025

Is this PR supposed to contain React Router and SolidStart changes as well?

oops, no, search and replace error ^^

@mydea mydea changed the title feat(astro): Streamline astro build logs feat(astro): Streamline build logs Aug 4, 2025
);
});
} else {
logger.warn('Source map generation is disabled in your Astro configuration.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
logger.warn('Source map generation is disabled in your Astro configuration.');
logger.warn(`Source map generation is disabled in your Astro configuration (\`${settingKey}: false\`.`);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to keep this extra compact, users can use debug: true for more information :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants