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

Build UMD if name was specified #173

Closed
wants to merge 1 commit into from

Conversation

danielkcz
Copy link
Contributor

Just a quick idea. I think it makes sense if a name was explicitly specified to have UMD build by default as well.

The issue for a reference: JustFly1984/react-google-maps-api#197

@jaredpalmer
Copy link
Owner

I feel like this is a magical side effect? Would it be better to throw an error saying that the name is irrelevant unless you specify --format=umd?

@danielkcz
Copy link
Contributor Author

danielkcz commented Aug 14, 2019

The worst thing that happens is that you get extra umd build which means slightly longer build time. Is it that bad side effect all considered?

Throwing error feels like an annoyance to a user with no usefulness. He kinda has to double confirm that he really wants that UMD format :)

Besides, currently, the esm,cjs is build by default. In case you need umd, you have to list all 3 formats there for no good reason. So utilizing the name is kinda escape hatch to "over configure" :)

I can tweak documentation to mention that behavior if you like. It was just an idea so I did not spend too much time with it.

@jaredpalmer
Copy link
Owner

Closing. I just think this is too magical for my taste.

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.

3 participants