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

Add units #3268

Merged
merged 3 commits into from
Oct 25, 2019
Merged

Add units #3268

merged 3 commits into from
Oct 25, 2019

Conversation

aryzing
Copy link
Contributor

@aryzing aryzing commented Aug 24, 2019

I can hear my science teacher in the back of my head: "Always add units!"

I can hear my science teacher in the back of my head: "Always add units!"
@netlify
Copy link

netlify bot commented Aug 24, 2019

Preview is ready

Built with commit c8e7b9e

https://deploy-preview-3268--webpackjsorg-netlify.netlify.com

Copy link
Member

@EugeneHlushko EugeneHlushko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minSize definition already mentions bytes, you can add same note to maxSize definition, the rest of the text considers you can access the definition of the prop to know more about it

@aryzing
Copy link
Contributor Author

aryzing commented Aug 28, 2019

Thanks for reviewing this PR. I'm going to go out on a limb here and say that I think that you interpreted that this PR was adding units to minSize (which as you correctly point out already states the units) rather than adding units to maxSize.

Please let me know if that's not the case, or how this PR can be otherwise improved.

@EugeneHlushko
Copy link
Member

Hi @aryzing
Unfortunately i still think that we dont want to add units everywhere where the option is mentioned. When we would speak about timeout we wouldnt add ms e.g. "After the timeout milliseconds is triggered, X is called"

@EugeneHlushko
Copy link
Member

We can keep the PR in current shape and wait for more contributors reviews if you like

@aryzing
Copy link
Contributor Author

aryzing commented Aug 29, 2019

we dont want to add units everywhere

I very much agree with you, which is why this PR adds units once. I think we can both agree that each variable's units should be stated at least once.

Bear in mind that the docs aren't necessarily for a seasoned devs like yourself that are already familiar with the config, but rather for folks like me just trying to figure out how to set up webpack properly.

The experience I had while browsing this section of the documents was not great: I was left puzzled not knowing exactly how to make this option work. I then invested some time using trial-and-error builds, and finally, by chance, stumbled upon the minSize section, all of which could have been avoided by stating the option's units.

It's a single line PR that does make a positive difference.

@EugeneHlushko
Copy link
Member

Thanks for elaborating, still i would suggest adding it here once: https://webpack.js.org/plugins/split-chunks-plugin/#splitchunksmaxsize

@montogeek
Copy link
Member

This is a good addition, it only says "number", but it could be anything.

@montogeek montogeek merged commit 5b56503 into webpack:master Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants