Reduce unnecessary warning while including JSX transformer in browser#2149
Reduce unnecessary warning while including JSX transformer in browser#2149zpao merged 1 commit intofacebook:masterfrom
Conversation
|
I kind of want to keep it so it's noisy and bothers you and you don't forget to remove it in production. If it's not processing scripts and being quiet it becomes easier to leave it in in production. That might not really be our place to tell you, but could be helpful. I don't feel super strongly though, so would be interested in hearing what you think. |
|
I'm inclined to agree here and leave it as is. |
|
I agree having it for production noticing would be handy for sure, but on the other hand, personally I feel like maybe too aggressive while you only have it included but not encounter one script with I have been using the same on-the-fly feature from CoffeeScript and Less in a lot of side projects myself, which only need to served by a static http server e.g. GitHub Pages, yet not have to store compiled results into repository which, a) reduce redundancy b) does not depend on any command line compiler. Not to using in production is the best practice indeed, but sometime in reality it’s not all about production concern. Seems a little bit OT, so here is one approach in jsFiddle I have managed to combine CoffeeScript with JSX transformer, which leverage the power from both side. |
|
That's a good point. I still want to be noisy so this seems like a fine compromise. You fine with that @spicyj? I was trying to think of other compromises (leading idea I had was starting a 5 second timeout and tracking if any other APIs were called, then warning if not) but they're all a bit overkill. |
|
@imcotton Oh that's interesting. We haven't really done anything with log levels (but we've talked about it). Definitely might be worth exploring in JSXTransformer first before we do anything in React... |
Reduce unnecessary warning while including JSX transformer in browser
|
Let's just do it and if we need to change out minds later and/or refine this, so be it. |
Yet prevents calling
loadScriptswith empty array, hope it helps.