Skip to content

Minify @stlite/browser #1685

Description

@whitphx

@stlite/browser is now built by Vite's Library mode and it doesn't minify the bundle completely as https://vite.dev/config/build-options#build-minify says

Note the build.minify option does not minify whitespaces when using the 'es' format in lib mode, as it removes pure annotations and breaks tree-shaking.

It makes sense as it's more important to make libraries ESM-aware and tree-shake-friendly in general.

However, in our case, we want to minify the bundle even ignoring such benefits.

Refs:
https://zenn.dev/udop/articles/8d668b3625ddd9

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions