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

[Feature Request] .min.js entry to be minified by default #464

Open
devjiwonchoi opened this issue Feb 19, 2024 · 4 comments
Open

[Feature Request] .min.js entry to be minified by default #464

devjiwonchoi opened this issue Feb 19, 2024 · 4 comments

Comments

@devjiwonchoi
Copy link
Contributor

Example

package.json

{
  "main": "./dist/index.min.js"
}

CLI

bunchee ./src/index.ts -o ./dist/index.min.js

I'd love to contribute.

@huozhi
Copy link
Owner

huozhi commented Feb 19, 2024

Was thinking of the same thing few days ago, but found that I need to rewrite the exports parser to make it work.
Current composition of different conditions are not very ideal.

Also need to avoid minification being applied to some optimize condition like “development”

@devjiwonchoi
Copy link
Contributor Author

I see. Maybe later when handling the exports are rewritten?

@devjiwonchoi devjiwonchoi changed the title [Idea] .min.js entry to be minified by default [Feature Request] .min.js entry to be minified by default Feb 19, 2024
@huozhi
Copy link
Owner

huozhi commented Apr 26, 2024

This should be available to do now, we can only apply this for bundle files configured in exports field. But we don't apply it to CLI

@devjiwonchoi
Copy link
Contributor Author

Got it, will take a look shortly!

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

No branches or pull requests

2 participants