Dmitrii Profile picture
Sep 15, 2017 34 tweets 3 min read Twitter logo Read on Twitter
Ejecting react-create-app shows just how horribly and hoplessly complicated #Javascript infrastructure has become
I mean, besides the sheer number of moving parts, a third of configuration is about fighting bugs and behaviour in another third
Literally half of the code is "why the EFF isn't this default behaviour?"
Another half of the code is "how do you even discover this configuration, much less make sure it works correctly?"
This is absolute sheer insanity, and *everyone is not just ok with it, but praises this, and cheers this on*
Every single line in webpack.*.js by create-react-app is documented, otherwise you have no chance in hell understanding what is going on
Don't forget about ~150 LOC build/run/test scripts that spend half of their time fighting each other and other tools
Because *of course* you need to write your own webpack message formatter
Because *of course* you need to manually copy your public folder
Because *of course* you have to manually set up listeners for SIGINT and SIGTERM to tear down the dev server
Because *of course* you have to manually write a module resolution helper that basically replicates node's resolution mechanism
Because *of course* you have to manually write code that provides env variables to your code
Because *of course* dev server spits tons of crap, so you silence it and manually write a custom message emitter
Because *of course* you have to write your own error overlay for a dev server
Because *of course* you have to pretend your structured folders are flat for some tools, and you have to write manual overrides
Because *of course* source map generation may OOM, and you have to protect against that
Because *of course* you have to manually prevent people from importing stuff outside your project, or things "will be confusing"
Literally a third of comments are basically "this is a workaround, see issue #<three-four-digit-number>"
"Exclude .js files in file loader to keep css loader working". Process this sentence. Come back when you regain your will to live
You have to manually tell the caching plugin not to bust the cache of already cached paths, cached by the tool the plugin is written for
You have to manually create a list of your assets, otherwise you'd have to parse the html file to get them
Note, all of those "have to" are "*of course* you have to"
"By default ... this is confusing" is a thing that you really want to read in configuration code that overrides default behaviour
Of *course* you have to manually make sure that symlinks are resolved
*Of course* you have to manually read environment variables
and make sure they have been read be fore anything is built/started
And, of course, if something breaks, there's no chance in hell you'll be able to figure out what breaks
I mean, if something breaks in any of the tools.
Any tool that lets you transpile and bundle your stuff without jumping through hoops made of burning shit will take the world by storm
Well, all the CLI tools (angular-cli, react-create-app etc.) are quite popular just because they hide all this insanity
The amount of work people end up pouring into this (both as developers *and* users) is just insane
I feel really sorry for the developers of react-create-app. I cannot imaging the number of tableflips they go through at each iteration
Anyway. This was my rant of the day. I wanted to setup yet another side project. I'll just go ahead and gouge my eyes out with a rusty spoon
/end rant

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dmitrii

Dmitrii Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @dmitriid

Aug 16, 2018
Twitter has turned profitable. Algorithmic timelines, ads, likes surfacing etc. works. *For them* Don’t expect them to change that because you don’t like it 1/
Instagram is profitable. Algorithmic timelines, ads, stories, app that refreshes the entire feed when you blink etc. works. *For them* Don’t expect them to change it just because you don’t like it 2/
Facebook is profitable. Algorithmic feed, hate bubbles, fake news surfacing, ads, auto playing videos etc. work. *For them* Don’t expect... 3/
Read 5 tweets
Jul 14, 2018
Вписаться что ли в драму вокруг @5ht? :)

«О боже, человека травили 10 лет, да как вы могли, сволочи». Начнем с того, что эта виктимизация непонятна никому, кто с Сохацким общался в разных коммьюнити больше одного дня 1/n
Сохацкий — озлобленный на весь мир человек, непризанный никем гений, считающий себя превыше всех. С соответствующей культурой манерой общений.

В те моменты, когда предыдущее публичное поведение ему в чем-то мешало, он выпиливал свои комментарии, посты и т.п. 2/n
Потом все повторялось по кругу. Цикл занимал 2-3 года. Это сейчас его легко выставлять невинно пострадавшей овечкой, потому что все улики неоднократно надежно подчищены и удалены. Но все общение всегда состояло из:

- Макс, вопрос.
- Ты хуй, ты до мьеня не дорос, иди нахуй 3/n
Read 11 tweets
Oct 18, 2017
This attitude is exactly what prevents webpack from owning its own mistakes. Worse, it kills any discussion around Webpack 1/n
The laws of diminishing returns and all that. You solve a common problem that 80% of people face, then the next 80% etc. 2/n
Provide configurable opt-outs for people who want something else. *not* opt-ins for the most common cases out there
Read 40 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(