Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(core): Vite native method to remove loggers #534

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

vejja
Copy link
Collaborator

@vejja vejja commented Oct 11, 2024

Fixes #533

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

This PR introduces an alternative method for removing console.log statements.

The new method is based on Vite's native functionalities, whereas the currently existing method is based on the external unplugin-remove package.

The removeLoggers option can now accept a new value, which is true. The new method is enabled when removeLoggers is set to true, while the unplugin-remove package is still used when an object is used. This approach maintains compatibility with existing setups.

By default, removeLoggers is now set to true. This approach soft-deprecates the unplugin-remove method in all default setups.

We intend to fully deprecate the old approach in a future release.

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

Copy link

vercel bot commented Oct 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuxt-security ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 11, 2024 0:07am

@vejja vejja self-assigned this Oct 24, 2024
@vejja vejja requested a review from Baroshem October 24, 2024 15:35
@Baroshem Baroshem changed the base branch from main to chore/2.1.0 October 25, 2024 09:21
Copy link
Owner

@Baroshem Baroshem left a comment

Choose a reason for hiding this comment

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

Nice work buddy! I don't have any comments - I just changed the base branch to 2.1.0 :)

@Baroshem Baroshem merged commit 920d1fe into chore/2.1.0 Nov 4, 2024
5 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NUXT SECURITY conflicts with JSON import
2 participants