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

Update: Suppress warnings in production build #241

Conversation

kaffolder7
Copy link
Collaborator

@kaffolder7 kaffolder7 commented Feb 4, 2025

When building for production, various warnings are output which slows down production build. We don't really need these as warnings should more-so be output (& handled) during development and/or with specific NPM test script. This PR should lower CI/CD build times.

The following changes were made:

  • Suppress unused export properties (unused-export-let).
  • Suppress conflicting Svelte resolve warnings (conflicting-svelte-resolve).
  • Suppress empty chunk warnings (empty-chunk).
  • Suppress unused module imports (module-unused-import).
  • Keep other important warnings visible, so we’re still aware of potential issues.

We can now specify an (optional) VITE_BUILD_ENV=production during npm run build so that these warnings are ‘ignored’. (VITE_BUILD_ENV=development, by default)

Now, production build should be cleaner and faster! 🚀

When building for production, various warnings are output which slows down production build.

The following changes were made:
- Suppress unused export properties (unused-export-let).
- Suppress conflicting Svelte resolve warnings (conflicting-svelte-resolve).
- Suppress empty chunk warnings (empty-chunk).
- Suppress unused module imports (module-unused-import).
- Keep other important warnings visible, so we’re still aware of potential issues.

Now, production build should be cleaner and faster! 🚀
@rajnandan1
Copy link
Owner

Thanks for the contribution ❤️

@rajnandan1 rajnandan1 merged commit 3b1d95b into rajnandan1:main Feb 5, 2025
@kaffolder7 kaffolder7 deleted the feature/suppress-warnings-production-build branch February 8, 2025 00:44
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.

2 participants