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

docs: Added minify:true to EsbuildPlugin #335

Closed

Conversation

Alex-Sokolov
Copy link

After last update (#333) needed to explicit turn on minification

After last update need to explicit turn on minification via config option
@privatenumber
Copy link
Owner

It doesnt if its passed into optimization.

Are you experiencing different behavior?

@Alex-Sokolov
Copy link
Author

I use production config with mode: 'production'. And webpack runs optimizations for you depending on the chosen mode. Before update I got minified files automatically, after update files not minified when building for production until I add minify to EsbuildPlugin. I think that needed be clarified in docs

@privatenumber
Copy link
Owner

Sounds like a bug.

See the tests for expected behavior.

Would you mind sharing your configuration to demonstrate the behavior you're setting?

@privatenumber
Copy link
Owner

Here's the base repro template from the Bug report form.

You can see that the distribution is minified despite minify: true not being passed in:
https://stackblitz.com/edit/node-guv65j?file=dist%2Fmain.js&view=editor

Closing for now but feel free to provide more information or file a bug report if you can reproduce it.

@Alex-Sokolov
Copy link
Author

Alex-Sokolov commented Aug 18, 2023

Thanks for template!

Finally after work have a time to make a repro :) @privatenumber could you take a look?
https://stackblitz.com/edit/node-bexr5c?file=dist%2Fmain.js

When use [email protected]
Снимок экрана 2023-08-18 в 23 24 04

When use [email protected]
Снимок экрана 2023-08-18 в 23 24 26

@privatenumber
Copy link
Owner

Thanks, I've verified. This isn't really a bug but it's an inaccuracy caused by webpack-merge duplicating objects.

Will fix soon.

Next time, please start by filing an issue.

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