Skip to content

Build UMD if name was specified#173

Closed
danielkcz wants to merge 1 commit into
jaredpalmer:masterfrom
danielkcz:patch-1
Closed

Build UMD if name was specified#173
danielkcz wants to merge 1 commit into
jaredpalmer:masterfrom
danielkcz:patch-1

Conversation

@danielkcz

Copy link
Copy Markdown
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
Copy Markdown
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

danielkcz commented Aug 14, 2019

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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