Skip to content

Enable minification to reduce bundle size #335

@yamcodes

Description

@yamcodes

Summary

Enable minification in the build process to reduce bundle size by removing comments and minifying code.

Current State

  • Bundle size: 711 B (minified and brotlied)
  • Comments are included in the bundle
  • Build output is not minified

Proposed Solution

Enable minification in tsdown.config.ts by adding minify: true. This will:

  • Remove all comments from the bundle (JSDoc comments remain in source files for TypeScript)
  • Minify the JavaScript code
  • Reduce bundle size

Expected Outcome

  • Smaller bundle size
  • Comments removed from production bundle (but preserved in source for TypeScript tooling)
  • Improved code readability in bundle (minified)

Notes

JSDoc comments will remain in source files for TypeScript type checking and IDE hints, but will be stripped from the bundle during minification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions