-
Notifications
You must be signed in to change notification settings - Fork 17
Decide on whether to bundle React by default or not #28
Comments
At first glance, it would seem that Option 1 is simpler, because only 3 cases seem to arise from it, but that's just because you didn't include the following case: gopherjs build -m --tags noReactBundle In this case, the '-m' flag would have no effect, but that's essentially the same as the following Option 2 case, which you did include: gopherjs build -m Just from a logic point of view, I prefer option 2, because "affirmative action" tags/booleans are more readable (sometimes it can't be avoided, but setting a bool to true to disable something is awkward). |
@mpl thanks for the shout-out, no real opinion on this - i'm pretty far removed at the moment. Besides, the whole go -> JS thing scares me :) With that said, your reasoning for Option 2 seem ok |
@mpl - thanks for the comments. Apologies, I forgot to update the discussion in this PR when gopherjs/gopherjs#611 was closed. I need to do that as it has changed the proposed default. I will update the description later and ping back. |
@dotMR booo! ;P Once you get past the "tiny" fact that the generated js is gigantic, gopherjs is wonderful. It feels so empowering to be able to fix/add to the UI just by writing Go. @myitcv sorry for the thread hijacking, I'm done. |
@mpl - updated the issue description, also clarifying the point about |
Revised 2017-03-29 following resolution on gopherjs/gopherjs#611
As of f51106b whenever the
github.com/myitcv/gopherjs/react
package is included as part of a GopherJS build/serve, we bundle React's.js
files by default. That is to say in effect React's.js
files get loaded as the served/built GopherJS output is loaded.For context, React's
.js
files come in two flavours:This issue is designed to track discussion the decision on whether to bundle or not by default. Specifically there are two options:
Option 1: bundle by default
Option 2: require explicit build tag to bundle
The use of the GopherJS
-m
minify flag is orthogonal to either of the above options (following the conclusion on gopherjs/gopherjs#611)As is the point being decided in #31 (for now we bundle the production version, with the development option available via the
debug
build tag)The text was updated successfully, but these errors were encountered: