r/javascript • u/marosurbanec • Nov 30 '16
Modern JS developer workflow makes me sad
Edit:
Wow, I would never have expected so many replies and advises. I sincerely thank you all!
I would like to highlight 3 tips that have helped me the most:
@sdihgusdoiu - Hard Source Webpack Plugin. This plugin was rarely given a mention in other links given what a difference it makes and how simple it is to set up compared to other solutions.
My mental model: it calculates a hash for Webpack config and package.json. If neither a compilation unit nor the hashes changed, it reuses output of previous builds for that compilation unit.
This results in a massive decrease in (re)build times. ~70s build became ~5s.
I wish this would be built into Webpack itself, although I understand there are reasons why not.
@acemarke - Definitely a subjective hint that many people will dislike: Use
evalfor source maps in Webpack
Not only is it by far the fastest option for Webpack to produce, the source it emits is what the browser actually executes. No more brain-dead breakpoint jumps by Dev Tools. Now you are free to copy-paste and play around with code directly from the Dev Tools.
Yes, it does show an ugly transpiled code instead of your beautified ES6 + JSX, but it sounds much worse than it really is. Much more reliable and predictable thaninline-source-map.
@Retsam19 - for frequently used modules consider exporting them as globals using Expose loader
Being able to dynamically REPLrequire(modulePath)for any module seems not to be possible, although there are some Stack Overflow answers claiming it is. I couldn't get them working
Original Post:
This post is partly a rant, partly a cry for help, partly an inquiry about any tips and tricks that could improve our day-to-day work.
My company adopted a new, modern JS stack; all pretty standard:
React
Babel ES6 + JSX
Redux
Mocha
Webpack
React Router
lodash
along with their 1262 transitive dependencies (I'm not kidding here!)
As a result, my daily productivity plummeted. Honestly, I feel like x86 Assembly must have a friendlier set of developer tools.
A non-exhaustive list of issues:
We used to laugh at Java guys with their sluggish Maven, at C++ compilation times.
Nowadays it takes Webpack longer to build a todo app than for a complex Java project to download all dependencies, clean project, compile all files, run all tests, create a package and upload it to repository. npm is even worseSo...Webpack's hot reload, the mythical feature getting universal praise.
Apart from the fact that "hot" means "after 5 or more seconds", it comes with the worst of both worlds - sometimes it does work, sometimes it just doesn't; with no indication whatsoever whether it succeeded or not. So you spend 2 minutes figuring out why your fix didn't work, only to find out it hasn't been deployed in the first place. A colleague of mine stated: "I just don't trust hot reload. I always reload the entire page"Webpack or Babel or something comes with a special, depression inducing feature: if you make a syntax error in your file, instead of displaying a clear error, it loads some random cached build from half a day ago
my employer can definitely find a better use for its money than me tracing build bugs of some deeply nested transitive 3rd party library that whimsically has changed it's AMD/UMD exports
so...source maps. I can see my original sources in Developer Tools! Usually, that is. So, let's try to add a debug breakpoint to my code!
If you are lucky, it will stay on the line you clicked. Other times, it jumps a few lines up or down. Occasionally, it jumps to the bottom of the file. When developer tools sense that you haven't been frustrated for full 10 minutes, the breakpoint jumps to a 200kLoC app.js file, which freezes the entire Dev Tools and Chrome with it. Now, don't close Chrome at this point! If you do so, the next time you open Dev Tools, it will try to reopen the last session and freeze again. Just wait patiently for 2 minutes till Dev Tools finishes parsing the file, grab a cup of coffee. Actually, an antidepressant might be a better choice.you won a lottery and Dev Tools really did stop at your breakpoint. Congrats,. Now, let's inspect some expression. Uncaught ReferenceError: X is not defined. What? Well, Babel thinks the best way to compile this piece of code:
moment.isDate(...)
is to translate it to:
_moment2.default.isDate(...)
This is done to every ES6 import. And yes, that "2" in _moment2 can and will change to "3" or just disappear, at any point.Let's write some tests. Hm...they failed, let's see what's happening. Well, Chrome executes your test before it loads your sourcemaps, so it totally ignores your breakpoints. Remember that 200kLoC app.js file? That's your best bet now.
One of the best features of Javascript was an interactive REPL console in the browser. But that's so 2014! With Webpack/Babel, it's just not possible to get a reference to a particular module from Dev Tools Console. By design. Because best practices, man!
On the other hand, we have the 8th Wonder of the World, a time-travelling debugger for Redux. Last time I productively used it was never.
Is this...normal?
How do you cope it?
How is this clusterfuck touted as a state of the art in Javascript?
Did you also become alergic to the phrase
makes it easy to reason about
27
u/TheLarkInn Dec 01 '16 edited Dec 01 '16
FWIW as a maintainer of webpack, we are sorry this was the experience you got out of using the tool.
With that being said, I myself have championed your voice at the table for the organization for making it better and more usable for everyone.
The first and top complaint was our documentation. We vowed that we would not release webpack 2 from beta until we gave you a awesome first-time learning experience. As of last week we have finished that milestone and you can find our new docs page at webpack.js.org.
The second complaint is the configuration. Hands down the most contentious part of the library. If you have great ideas or feedback, we want them. I started a usability discussion thread planning to completely gut the configuration style to also make it easy to use with reasonable defaults and features. https://github.com/webpack/webpack/issues/2797
Regardless, bundling is the future. And we want people to help bring awesome ideas and criticisms and challenges our way, because it is the only way we can help make our toolings better for everyone, so please if you hate the tool and have a better idea, please reach out. We are leaving nothing off the table and want as many people involved. You can find me @TheLarkInn on Twitter or TheLarkInn on github. Shoot me a message or DM and we can start right there.
Thank you for candid remarks. I don't respond to this stuff to sealion or debate, rather to encourage this kind of challenging discussion in a way we can iterate and do better for developers and web performance.
Sean
6
u/marosurbanec Dec 01 '16
OP here
I am sorry if my post sounded like bashing Webpack. It's a very interesting piece of technology and you guys are doing a wonderful job. I mean it.
The infuriating aspect is the cool kids and fanboys who either
advocate something they have minimal experience with, or
are deeply familiar with its shortcomings, yet never mention them
1
u/TheLarkInn Dec 03 '16
No apology necessary. We really always want candid responses (it's how we've grown from just being a side project fr one guy in Germany for fun). Regardless, we expect people hold us accountable.
161
u/Tubbers Nov 30 '16
It sounds like:
You are probably not using incremental compilation, that will lead to long build times
You are probably not using webpack multithreaded builds, which will also help significantly
Inline source maps have tended to work significantly better for me
Time travel debugging/HMR is for sure insanely useful, it's easiest to see when you have a setup that live updates on saves. You can see the results as you code. Similarly if there is an error encountered, you can see precisely when and where it happened, and make adjustments again effectively live to see the error resolved. If you're unable to take advantage of this, it just means you haven't invested the time to get the setup working for it to pay off. It is for sure an investment, but it will pay off if you devote more time to it.
Pretty much all of these things have a learning curve, and for it to pay off you do need to invest a lot of time ripping out your hair. In the long run, it will pay off, but definitely not in the short run. A large part of that as well is just how new the ecosystem is, are your frustrations are certainly warranted.
9
u/marosurbanec Dec 01 '16
I really wish what you said would be true. We have had truly skilled JS devs trying to optimize out Webpack setup, only to shave off few seconds on a clean build or ~100ms on incremental builds.
Based on open Github issues, there are other people with exactly the same experience.
3
u/Tubbers Dec 01 '16
All of the linked issues showed the reporters were able to reduce build times by 50-80% and they posted their workarounds.
I'm not saying you don't have truly skilled developers, or that these problems are not real and legitimate. Without knowing more about your specific setup I can't offer any suggestions aside from following the ideas in those issues you linked, which cover all of the suggestions in my post. This may also be a good resource, but you and your team may have already looked at it: https://webpack.github.io/docs/build-performance.html
1
Dec 01 '16
Look up compiling into multiple bundles for your dev config. One for stack dependencies, one for your application. When using the dev server my fairly large applications compile in seconds whenever I save a file.
9
u/kevisazombie Nov 30 '16
Probably the best reply in the thread. Solid actionable suggestions.
30
u/SilasX Dec 01 '16
Just goes to prove, if you want an answer, don't ask for it since you'll be ignored. Instead, confidently say that there is no solution, so people go to tremendous lengths to prove you wrong.
6
Nov 30 '16
Can you enlighten me on multi threaded webpack?
2
u/TheLarkInn Dec 01 '16
Also you can checkout HappyPack which does spawns for the parallel loader api for webpack. Useful.
0
1
u/h0b0_shanker Dec 01 '16
Don't forget about "Investment" You aren't setting all this up to make your day better tomorrow, or even next week. Your doing this so 6 months from now you know exactly where to find something, debug it, and release a patch. If all you do is websites with a contact form, then yes, this is an overkill.
0
Dec 01 '16
[deleted]
2
u/h0b0_shanker Dec 01 '16
You might be right. Maybe the front end isn't the place for people who don't like change? Personally I love trying out new stuff, I love experimenting, and I love when some new sexy framework is released. You have to understand, the front end is the final layer between the user and what they're trying to get from your product/service/website. How CAN there be a standard? How CAN there be just one framework? It's constantly changing because the needs of that layer are constantly changing. Pick the right tool for the job. No one is putting a gun to your head and forcing you to move to the new stuff. Now that being said, I KNOW it's frustrating. And I'll say the same thing I said to my brother who was fed up with this, if you don't enjoy it, do something else. He is now in machine learning and data science and absolutely loves it.
0
1
24
u/perestroika12 Nov 30 '16 edited Nov 30 '16
Have you ever tried another language? My maven (java/scala) build times can be 10 minutes for a full rebuild after I make a change, and that's just compile time. Then you have to run jetty to actually spin up the application (rest api in this case) which is another minute or two. Not saying it's okay just saying long compile times are not just js or web pack and usually is determined by the size and scope of the application.
No language is magically fast at 200k lines of code. Sounds like you moved from a small company to a large one and are now dealing with what it means to work in the same repo as 30 other devs.
4
u/marosurbanec Dec 01 '16
mvn clean compile tomcat7:runOn a Java codebase of 70kloc, takes about 15 seconds. About half of the time spent obtaining a pool of DB connections = waiting for an external resource.
Babel/React stack - 16kloc, takes about a minute.
1
u/perestroika12 Dec 01 '16 edited Dec 01 '16
You shouldn't need to compile the entire project every time you make a change. Webpack has a fair amount of optimizations that you can use: https://webpack.github.io/docs/build-performance.html
Like any compiled language/framework a full rebuild is overkill.
8
Nov 30 '16
That was the best back in my C++ days. "Oh dear, I changed this header file and now I'm going to be compiling for the next 20 minutes. Guess I'll have to take a break." It was great for those days where you just couldn't muster any kind of motivation.
2
u/perestroika12 Nov 30 '16
Scala is unfortunately sort of smart in that regard, between SBT and zinc you can incrementally compile. Intellij also does some hot reloading of classes so in most cases you don't even need to build. I would say my average build time is around 2-3 min. But when some large changes get pushed out, yeah, looking at a coffee run at least.
There's also this gem: http://zeroturnaround.com/software/jrebel/
I would assume wepack has the ability to incrementally compile but have not looked into it.
→ More replies (2)2
u/davertron Nov 30 '16
Yeah, the op's experience is exactly the opposite of mine. We have a fairly large single page app, and it still kicks the shit out of any of our Java apps as far as compile/start-up times. I have no idea what kind of apps they have for the backend (micro-services maybe ;P) but before our single page app I worked in Grails and Java and I don't miss it one bit.
1
u/lechatsportif Dec 01 '16
10 minutes in any java build is a huge problem somewhere in your module or your using gradle. i was running a mixed scalajs and scala build on sbt incremental and annoyes it was taking 10 secs like 2 years ago. also, being statically analyzed java rebuilds arent needed as frequently.
→ More replies (1)1
u/mhd Dec 01 '16
And I've had C++ code bases that took literally hours. But that really shouldn't be the yardstick here. Compare it to interpreted languages, where setup times are usually quite quick. PHP is basically sold on this principle alone.
And 200k lines would've been no issue for Turbo Pascal on my ancient 286.
8
u/Retsam19 Nov 30 '16
One of the best features of Javascript was an interactive REPL console in the browser. But that's so 2014! With Webpack/Babel, it's just not possible to get a reference to a particular module from Dev Tools Console. By design. Because best practices, man!
For this I use the webpack expose-loader. Then you can do require("expose?foo!path/to/foo") and then foo will be available in the dev tools. You can either just stick this inline when you're trying to debug a problem, or else you can have a dedicated section of the code for doing this:
if(__DEV__) { //Use the webpack.DefinePlugin to define this and this will get compiled away
require("expose?_!lodash");
require("expose?$!jQuery");
require("expose?ko!knockout");
require("expose?someService!path/to/service");
}→ More replies (3)1
u/marosurbanec Dec 02 '16
Yeah, but having a generic require(moduleName) function seems all but impossible.
(There are some Stack Overflow hints)[http://stackoverflow.com/questions/29223071/how-do-i-require-from-the-console-using-webpack], yet I couldn't get them working. Webpack doesn't want to load modules based on JS variables, only hard-coded strings allowed.
1
u/Retsam19 Dec 02 '16
Yeah, you can't do generic requires with webpack, because webpack uses the
requirecalls to determine what needs to be bundled. If you try to write a generic require that can require anything, then webpack has to bundle absolutely everything.I really suggest just sticking to the expose-loader; while I missed RequireJS's ability to require arbitrary things at first, I don't find that the expose-loader style bothers me much anymore (and as a whole I greatly prefer webpack over RequireJS).
1
u/Venryx Mar 27 '17
I found a generic way which seems to work: http://stackoverflow.com/a/43055806/2441655
38
u/lhorie Nov 30 '16 edited Nov 30 '16
I have two main projects I jump between at work currently. One is something a co-worker setup w/ Webpack and half a dozen plugins, Babel, Ramda, Mocha+Should, hot module reloading and all that jazz. We got css modules compiling SASS, a browsersync proxy, you name it.
The other one uses a one-liner webpack.config (actually, it could even run without webpack), and there's no ES6, no redux, not even lodash. CSS is just CSS, no SASS, no css modules. The only major dependency is Mithril.js and the architecture follows its general just-enough-to-get-shit-done mantra.
The difference is just night and day. With the "modern" codebase, it takes me like 10 minutes for the project to even start running. The amont of time I've spent fighting w/ HMR alone is stupid, it's gotten fairly slow over time (~2 seconds now is quite noticeable delay and enough to make me reach for ctrl+r) and it breaks a lot of things (I literally cannot test things related to my the upload library without a refresh). I can't tell what a cryptic css class maps to when inspecting the DOM because css modules. Don't even get me started on the 1MB library that bundles all of React and a bunch of related libs (so now there are two view frameworks in the project) because they too want a "modern" stack.
The other codebase is "unsexy" and couldn't add a buzzword to your resume to save its life, but I literally never spend time on the yak shaving crap that I do with the first. </rant>
4
u/fzammetti Dec 01 '16
I wrote a big reply that basically says the same but decided not to post it figuring it'd get down voted to hell.
Which, come to think of it, sums up the core problem with "modern" front-end development, doesn't it?
All these tools and frameworks and what have you get thrown in because people who really don't have the experience to know any better think that's the way it's supposed to be because some Silicon Valley hot shot wrote a blog and made it sound cool. And people don't like to speak up because they get shouted down by the "cool kids".
I've got the same experience as you though: simple is better, in a nutshell. A little bit of good architecture mixed with developer discipline with a sprinkling of the right tools when actually needed yields a far better experience than all the new hotness trying to do 90% of the work for me.
2
u/marosurbanec Dec 01 '16
I certainly think you'd get more upvotes than downvotes.
The most aggravating part of the modern stack is that it's a complete blackbox. A blackbox that keeps exploding on its own schedule. The builds fail more often due to 3rd party issues than due to the code I pushed. I can't be confident that pressing the "Build" button in CI is going to produce a working package if our code hasn't changed. I am no longer in control of my projects.
→ More replies (1)1
u/fuck_with_me Dec 01 '16
Are you allowing deps to update on their own? If so, stop doing that immediately and you'll be fine...
1
u/marosurbanec Dec 01 '16
Sorry, could you please elaborate a bit more?
If you mean npm shrinkwrap, that's a no-go. MacOS deps will make Windows/Linux build fail. Windows deps will fail MacOS/Linux, etc.
→ More replies (3)15
u/nerf_herd Nov 30 '16
The other codebase is "unsexy" and couldn't add a buzzword to your resume to save its life, but I literally never spend time on the yak shaving crap that I do with the first. </rant>
This is probably a much larger part of the problem, and the folks who think the current state of development is "awesome" don't have enough experience to know any better.
when %99.999 of this can be handled with a simple program/shell script and a tiny bit of planning.
About the only tool I use is tsc, because experience has taught me that types are good, and even after trying every IDE out there I'm back to eclipse, because it is ok at javascript and good at other things that are not javascript.
The main difference is I fancy myself a programmer, where I have a vested interest in the maintainability of all points in the stack, and these tools are aimed at the developer community who only care what the user sees and trial and error their way there (at predictably great expense). I also have a CS degree FWIW.
16
u/themaincop Nov 30 '16
This is probably a much larger part of the problem, and the folks who think the current state of development is "awesome" don't have enough experience to know any better.
Unless you lived through the hell of debugging Scriptaculous animations and Prototype.js AJAX calls in IE6 I don't really want to hear about how all the tooling we have these days is somehow worse than what came before.
11
u/mark_b_real Nov 30 '16
I lived in those days and it's def getting close to there.
3
u/themaincop Nov 30 '16
Sure, we have new problems and challenges now, but look how much more we're accomplishing in the browser than we were back then.
If the job ever gets to the point where it's easy it just means you've stopped evolving.
→ More replies (3)8
u/cogman10 Nov 30 '16
Yeah. I have to agree. This all sounds very whiny to me.
I lived in the days of jQuery blob pages, with all the dependencies coming in separate files and the only way to really know what was going on when was crafty print statements or some hokey floating div console.
Javascript development pre-node/webpack/grunt/gulp was a nightmarish experience. There is a reason why so much work was put into server side rendering via ASP/MVC/JSP/RoR/Flask applications, javascript was nowhere near able to handle it and anyone that tried to do it ended up with some really unwieldy source files to maintain.
The javascript ecosystem is far from perfect, but it is WAY better than it used to be. Now, you almost never have to think "Will this work on IE", it just does.
6
u/lhorie Nov 30 '16
I actually lived through Scriptaculous, IE6 bugs, VB scripts to make Flash talk to JS, and a lot of that old school insanity, and honestly, it was fun. You'd have to learn all these unspeakable hacks but you'd come out at the end of the day with something to show to the client. The state of affairs was bizarre but it was fairly stable for a good few years before jQuery became a thing (and it was fairly stable for a few years after that too), so you could accumulate knowledge and actually level up your IE slaying skills.
The problem these days is that you get a lot of "eh I spent 20 hrs trying to get HMR working, I'll figure out how to configure it properly later"... and 10 months later, it's a mess of half a dozen half-ass-configured things and poorly understood infrastructure. It's largely self-inflicted code debt, but it's difficult to justify spending time on these things to a client. And instead of ever investing the time to learn a tool properly like you'd do in most other programming languages, a lot of times the go-to "solution" that people reach for is "eh, I'll try this other thing I saw on Reddit 3 days ago"
The shift is essentially that the old suckiness was a technical problem that could be overcome w/ craftsmanship, but today's suckiness is largely a social problem that is a product of coming into programming with a consumerist, impulsive shopping mentality.
→ More replies (1)7
u/themaincop Nov 30 '16
Maybe the new ecosystems make life worse for people who treat programming like impulse shopping, but for those of us who actually do enjoy the craftsmanship aspect of it, things have never been better. If you actually take the time to learn what webpack is doing (which really doesn't take long) you get access to a ton of tools that make life easier and allow you to build bigger and more complex things.
I think you're wearing rose colored glasses if you somehow think that spending a day debugging obtuse errors from IE6 was better or more productive than tinkering with your dev environment.
5
u/lhorie Dec 01 '16 edited Dec 01 '16
I think you're wearing rose colored glasses
Maybe. Personally I did feel more productive debugging obtuse errors back then than I do tinkering w/ dev environments now. Don't get me wrong, tinkering w/ dev ergonomics can be fun, but I feel that all that tinkering detracts from actually doing meaningful work. But to each their own.
re: Webpack - it itself isn't bad, and I can make it do what I need just fine. The problem is what I said earlier, of someone in your team going to town with random plugins on top of a random boilerplate when the deadline is in a month, and then nobody has time to continue arguing why that was a bad idea, nor time to fix the source maps, or figure out why HMR is being dog slow or why some other thing is broken in some annoying but not completely showstopper way
→ More replies (5)3
u/arnorhs Nov 30 '16
tooling is for sure better. no question. you can find a tool to do almost anything.
however, there's a lot of hype. and there's a lot of people out there that will just see a cool sales page for a new shiny node module (yes, i'm calling them what they are, even though there's no purchase involved), and will just start installing everything.
the barrier to entry for adopting a new module is so low, it's just one npm install away, it makes it so if you are not practicing due diligence and vetting what you install, and being very picky about what you need, you will very easily end up in bloat land.
most of the modules and stuff out there can be very useful. however it depends a lot on what you're doing and you should be picky about what you install.
it's like when going to the dollar store. you can just about walk out with two bags full of things you think you might one day use or they might be useful, but likely it'll just end up in your recycle bin or worse, in your storage.
6
u/themaincop Nov 30 '16
Sure, but it's been that way for ages. Before npm modules it was jQuery plugins.
24
u/CrypticWriter Nov 30 '16
I personally find that the state of JavaScript has made front end development not very fun. Additionally, I don't think the products being made with this new React/ReactRouter/Babel etc etc stack are any better than the stuff that was made maybe 5 or 6 years ago.
How to cope? I just moved to server side development. Also, aside from needing to use that React stack for work, keep in mind that there's nothing wrong with jQuery
4
u/marosurbanec Dec 01 '16
exactly my story, too.
I loved working with RequireJS, ES5 and a simple usage of React. Fast, predictable and robust. If my build broke, it was my fault.
With Babel/Redux, I am no longer in control; so I moved to server-side, where I am not at a mercy of immature tools and 3rd party transitive dependencies.
→ More replies (1)1
u/gabbsmo Dec 01 '16
It is almost 2017 and the node based tooling is still no where near as easy to use as the old server side asset pipelines such as Sprockets and ASP.NET Bundling.
12
Nov 30 '16 edited Nov 30 '16
All these are the problems I worry can happen any time I bring in a new technology into a project. That is why I add things one at a time, and only use them in such a way that they encourage deeper understanding of it. I shy away from the features that do lots of magical things for me until I am ready to understand them. Each new thing you bring into a project will bring problems along with it. Along the way you have to take time to address each issue as it comes up, not just keep moving along because of deadlines. If you can't figure out how to address a particular issue, you have to decide if it is worth it to keep using that thing.
I would suggest you talk to the other devs at your company and see if they are having the same problems. Take time to address each problem one by one.
I tend to distrust claims about a technology solving a problem that I normally see failing all over the place. Webpack sounds really sketchy to me. Not that they are the same thing, but it reminds me of a problem I recently had. I am not using webpack, but this experience reminds me that browsers and the web and downloading resources are still very unreliable in general. I just did a new release to a website the other day, and when I visited it after deploying, the HTML and stuff was all messed up because of caching. I had to do a force refresh. Browsers haven't even figured out how to only use cached stuff when the online resource is not newer... How that is considered acceptable or better than not caching at all is completely beyond me. If you updated a non-HTML application and only parts of it updated and other parts of it used old code, and the behavior was not right, and you were told "Oh don't worry that is not our fault that happened. It is just some caching the OS does to keep your apps running faster, you have to press (insert keyboard shortcut here) to clear the cache once in a while", how well would that go over with you? But for some reason we are ok with it on the web... Also, any technology that helps you to sync anything will probably fail constantly. Why do I say this? I have never used any program that auto syncs anything that did not constantly do bad things and frustrate me. I'm not talking about programming tools, I'm just talking about end user applications.
My point is, it is better to stick with the lo-tech/old/roll your own mentality until you understand how/if you should use some newfangled thing. Don't get me wrong, I love newfangled things. I just insist on understanding them before relying on them / deploying code that uses them.
So here are some alternatives I would recommend exploring if you can't fix these issues. Get your company to adopt a rule about what browsers they will support. Normally it is ok to say you only support the major browsers that are auto-updated and then just assume your users keep theirs updated. Then instead of using transpilers, only use javascript features that work in those browsers. Then you don't need source maps and debugging should be easier. Although you might need to introduce some tool that scans your code for the javascript features you are not supposed to use...
As others have suggested, try using yarn instead of npm. I don't know if that will really solve any of your problems, but people seem to think yarn is mostly better at most things.
If yarn is still too slow because of too many dependencies, well maybe you should roll your own versions of some of these. The basic concept behind redux is simple enough that you should be able to make a simple version of it yourself. The massive explosion of dependencies has me concerned that most websites are simply insecure now. How many companies really make sure all their dependencies are up to date, and make sure those dependencies are ok to use because they are using up to date dependencies? How many companies actually look into if any of these dependencies have known security issues? Sometimes it is better just to roll your own and keep your dependencies low. Now as far as security related features you are probably better off using a trusted tool instead of rolling your own, but check out its' dependencies.
Also, you seem to be in the mood to enjoy this commentary on being a programmer: https://www.youtube.com/watch?v=MticYPfFRp8
3
u/marosurbanec Dec 01 '16
The thing is...what you recommend is indeed the way we did our job 2 years ago. We did develop UIs that our customers loved, on time and on budget.
Since then, UI side of our company has been overrun by hipsters and cool kids more interested in the newest tech blog post than in solving real customers' needs. 2-3 grumpy old experienced developers can't outshout 20 cool kids pitching about "developing in future stack now", on "npm and Github, the biggest and the fastest growing community".
10
u/goodwid Nov 30 '16
Browsers haven't even figured out how to only use cached stuff when the online resource is not newer
There are only two hard problems in computer science: Naming things, cache invalidation, and off-by-one errors.
→ More replies (1)2
u/SamSlate Nov 30 '16 edited Nov 30 '16
Amature here, what is the caching problem for html, exactly? I add a version paramameter (ie src="web.com/js/file.js?v=*{versionNumber}*") to all js/css files so they're always updated by all user's browser when the page has changed. Maybe you're describing a different issue?
2
12
u/gaearon Nov 30 '16 edited Nov 30 '16
A colleague of mine stated: "I just don't trust hot reload. I always reload the entire page"
Then why are you using it? Why are you not removing it?
A large part of the problem is when people integrate technologies clearly labeled as experimental, and expect them to be stable. They're just not, and never were. Please don't integrate something if it doesn't work well for you.
We're trying to figure out a minimal setup with hidden dependencies in Create React App that only includes stable software that works together well. I recommend you to give it a try and maybe adopt some ideas (even if you can't use it directly).
Cheers!
→ More replies (20)
2
u/amoe_ Dec 01 '16
Two things you say are really true & important: hot reload is overrated and maybe even conceptually flawed, and the fact that Webpack broke the browser REPL. The latter is really a massive functionality regression and there's not really any great solution. The expose-loader is hacky and bad.
Webpack compile time is not bad at all, though. Java's also really good these days, on the other hand, so it's not surprising that a highly optimized compiler for a mature and arguably simpler language runs at the same speed as a newish one. I've got a good bet that IntelliJ IDEA still destroys any JS dev tool and probably will for the foreseeable future.
2
u/marosurbanec Dec 01 '16
On IDEA and WebStorm: quite to the contrary. It's just jaw-dropping how quickly can they roll out IDE features idiosyncratic to a particular library or framework. I don't know what witchcraft and sorcery they use, but their IDEs are quite up-to-date with modern JS.
73
u/benboulot Nov 30 '16
AND THE BEST THING ABOUT THOSE WEB BUZZWORD STACKS IS: by the time you get a decent expertise of all these technologies/frameworks/etc, you'll notice bloggers, forum evangelists and buzzmakers have moved onto the next ones, it's all deprecated!
17
u/shif Nov 30 '16
but the experience will remain and it will be easier taking the new shiny js framework
17
u/protonfish Nov 30 '16
My experience is that there is too little overlap between frameworks-of-the-week that there isn't lasting benefit. Bad development habits are more likely the reward you receive from using poor frameworks.
11
u/ngly Nov 30 '16
As much as people might shit on Frameworks, I think they've greatly increased my programming mentality and how I approach problems. React was the first framework that really taught me how to break UI down into components. I've also really adopted functional programming since learning React.
5
u/nostrademons Nov 30 '16
Curious how much experience you had before React? Swing was the first framework that really taught me how to break UI down into components, and it was available in 1997. Had I been a high-school kid a decade or so earlier, NeXTSTEP would probably have been the first framework that taught me how to break UI down into components. I adopted functional programming when I learned Haskell in 2003, and had I been a college kid a decade earlier, it would've been SML in the early 90s, or Lisp in the early 80s.
You absolutely should learn the basic software principles underlying the frameworks, but the frameworks themselves will come and go, probably in barely 2-3 years.
→ More replies (2)→ More replies (1)7
u/arnorhs Nov 30 '16
When you start out learning to program (first 5-10 years) it's easy to fall into the trap of false attribution when it comes to deciding what the cause is for oneself to adopt new/better practices and improve at one's trade.
To become a really good programmer, you need to learn a lot of different languages, frameworks, platforms, etc and survive a lot of trends and legacy code and what not.
It's hard to see until you're actually there.
8
u/Beaulne Nov 30 '16
Thats only partly true. I worked for a company that used angular / Node, now I work using react-redux and ruby. I would have considered myself fairly seasoned with angular and JS, but moving to react (specifically redux, sagas etc) proved to be a HUGE headache. The level of complexity and hardship moving from one framework to another has been such a headache due to the huge amount of dependant technologies.
Not only are the libraries getting out of hand, but so are the paradigms... You have OOP, functional, reactive. And on top of THAT you are moving from ES2015 to 2016 to 2017.
JS as it is, is a beautiful thing, but can become a mess FAST.
4
u/bwaxxlo tckidd Nov 30 '16
Why have I never ran into this? It seems like most people who complain run into problems because they try to forcefully connect the logic behind one stack to the next. I worked with Angular before moving to React. I started working for an ember company 4 months ago and I still don't run into problems that grind me down. If it helps, start with understanding what the original project was trying to solve. Plus, most of the libraries already use the same ideas throughout. Components, routers, view, model, template, controllers, service, mixin etc. They are all the same things but just configured differently depending on the library/framework. If you already know JS, the rest of this stuff shouldn't take too long to figure out.
4
u/time-lord Dec 01 '16
The problem isn't vanilla JS + frameworks. The problem is a framework + some plugin, which works until another component updates, causing a partially broken project. Comment out the code, use a different plugin, and now you have code rot. Multiply across a few developers and a few years, and your project has become an unmanageable mess. Time to start all over again with a new framework, and lose all of the knowledge of that particular stack you've gained in the past few years.
These are issues you don't have in a more mature stack like .net or C++ or Java or even PHP.
→ More replies (1)→ More replies (1)1
2
u/TheLarkInn Dec 01 '16
We will still be around with webpack. 800% growth a year from now, and we have no plans on stopping :)
7
u/wizang Dec 01 '16
Not to turn this into a "my framework is the best framework" war but ember-cli does everything your list of tools does (add in lodash etc), but in a single swoop. Developing ember is a joy. Come at me bros.
1
6
u/mr_fi Nov 30 '16
For the longest time I have been wondering whether the js community at large would reach a tipping point in questioning if investing so much time adding compilation on top of an interpreted scripting language is really worth it. Are we there yet?
It seems to me that javascript shouldn't be THE language of the web because it clearly doesn't serve the needs of developers. Even with all that future iterations of ECMA promise, where is it all going? To a future where you still have compilation steps for large scale apps? If compilation is necessary, how strong is the case for a compiled language?
Is web assembly an answer? I am not a seasoned web dev by any means, so I just wonder about these things because I don't want to go into the quagmire of learning all these build tools when I can honestly still write reasonable sized apps in javascript with some dependencies and tests.
tl;dr: Possibly unenlightened dude wonders if compiling an interpreted language into an interpreted language is necessary and how can we stop it?
27
u/mini_eggs Nov 30 '16
Whoever setup your build process did it wrong. These tools are meant for empowering developers.
14
u/here-to-jerk-off Nov 30 '16
victim shaming :P
4
u/lechatsportif Dec 01 '16
agree with his assessment. live reload with babel transforms on shitty dual core pcs is less than 2 seconds.
19
u/aFoolsDuty Nov 30 '16
Honestly most of these problems are alien to me. Might just be that I have the "perfect setup," though.
The only issue I've run headfirst into is the source maps + DevTools combo being super wtfy in terms of how breakpoints and in-scope variables are. Fortunately, most of the time I'm using React/Redux or Vue/Vuex, so its super obvious what went wrong and why just by looking at the aberrant behavior.
2
u/Mestyo Dec 01 '16
Yeah, something is seriously wrong with OPs setup. Nothing he wrote even remotely resonates with my experience with build tools.
32
Nov 30 '16
I put my face in my hands and cry everyday I get to work. And while my work system is building (about 15 minutes) and wasting time loading pages (in minutes) I try to keep my soul from crushing by simultaneously working on my vanilla JS open source projects. Services are unreliable and the app is constantly breaking, so I have to rebuild a few times a day, so those few minutes of nothing really add up... and my soul is crushed a little more everyday.
5
u/seiyria Nov 30 '16
There was a place I worked at where it would sometimes take 10 minutes (minimum of 2) to reload every time you wanted to test a change. That was with ~24gb RAM in the machine. Also, you would have to set up an auto-refresher to keep you logged in because they didn't want to let your login session persist for more than 15 minutes, and if your session timed out, reloading would take even longer.
Soul=crushed
2
u/h0b0_shanker Dec 01 '16
With great power comes great responsibility. It sounds like your configuration and stack is all out of wack. Moving to these technologies at work has improved every aspect of our development flow. Good luck though I can definitely understand the frustration if something isn't working correctly, the whole house of cards kinda falls down doesn't it?
2
Dec 01 '16
The problem is multi-faceted.
older technology
centrally managed
Backbone.js
partial server side HTML generation intermixed with Handlebars logic for partial client-side rendering
MVC
and the list goes on...
None of those, however, explain why its soooooo damn slow (to execute) and so very unreliable. I really blame things like build tasks, layers of abstractions, and multiple rendering/template steps. Its so utterly painful.
To really add an additional slap in the face my own personal software does more with far fewer resources and executes more than 10x faster even though this is one of the largest .coms. At some point in the future I feel we are going to need 1tb of ram and quad-SLI GPUs to pull up the homepage.
I haven't even mentioned developer speed. Because of the layers of abstractions and the complete lack of control to modify a segment of code without breaking something else (insufficient separation of concerns) a 10 minute UI tasks is actually a 1-2 week effort. It is really taking 2 weeks time to get a new form of pricing data into a single area of a single page. On the other hand, in a 48 hour hackday, I was able to create a tool with an original GUI, node service and curl implementation, and render a variety of results into a new and original service up time dashboard.
I really believe the sole purpose of a tech stack is to flatten a bell curve. The stack is designed for first impression popular appeal. The few developers who are horrible under qualified and can't do their jobs can now contribute. On the other hand the few rock stars are now moving through slim cranking out tiny changes in very slow time.
→ More replies (3)
8
u/apatheorist Nov 30 '16 edited Nov 30 '16
How do I cope? I remember what it was like writing Javascript [in] 1997. And 2007. And even 2010.
16
u/themaincop Nov 30 '16
I agree, jQuery sucks and Prototype.js does everything we need!
Wait... what are we arguing about?
→ More replies (2)1
4
u/Capaj Nov 30 '16 edited Nov 30 '16
I just don't trust hot reload
If you don't keep your state inside components, using react-hot-loader is WRONG! it is not 100% reliable and therefore you can't trust it. Dan Abramov basically put the project on hold because it is very very hard to make it work. IMO no one will be able to make it reliable. Always use plain Webpack's module.hot for hot reloading. That one works 100% reliably.
4
u/-btr Dec 01 '16
I'm not even a real js dev and I'm already well tired of
makes it easy to reason about
4
u/chaseoc Dec 01 '16
Anyone feel that opposite?
I'm loving react and webpack. Its a steep learning curve to get started with it, but honestly it gives you incredible development speed and hot reloading is a godsend.
My one complaint is that there is no focus right now in the community. I'd love some more concrete direction from industry leaders on which frameworks could be considered 'necessary learning'. But really it doesn't take that long to get up to speed on a new one, but I'd love to be able to spend time mastering it before everyone just moves to another.
1
Nov 30 '16 edited Feb 17 '17
eIfvDQW%I8: v6c68hr<cc)eO%([0SC.0RrT q9qB~SO&;9EwFh%H:~Nc%J+([T:q%xQ~*C#dRIb]qOzX3$)9)U(+F%Q
1
u/marosurbanec Dec 01 '16
I think it gets slower when you reach more than 2k modules to bundle. Quick googling reveals several other projects that claim to experience bundling times in the same ballpark as ours.
1
Dec 01 '16 edited Dec 01 '16
I get the struggle with setting up tools sometimes. But the current versions of the tools you name are now pretty stable. I don't know what versions you use.
Honestly, I don't use hot reloading in most projects either. That one can still be buggy.
Source maps always work well for me, you know webpack has different options for that?
Don't have problems with slow tests, I run them natively in node (so not phantom or real browsers) and they are fast and reliable.
Webpack also has some caching options, for instance you can extract your vendor code into a vendor bundle, that one will never rebuild because they don't change mostly during development.
So I had some of your struggles a year ago but not anymore!
Realize that React DOES solve a problem that is really hard to solve without a library and that is rendering DOM declarative. There's a pretty clever algorith needed to do that performantly. That is something that will make it possible to render client side without al the DOM manipulation hassle.
1
u/marosurbanec Dec 01 '16
About the test - you misunderstood my point.
It's not them being slow. It's them being too fast. They are already over before Chrome loads sourcemaps, effectively dooming you to debug the transpiled code.
1
Dec 10 '16
Okay, did not read correctly the. But that is, when you run them in the browser. If you run them in node with a decent test runner and enzyme for react components it's more easy to test and debug.
1
u/sdihgusdoiu Dec 01 '16
To be honest, I'd have totally agreed with you a few months ago. I shared your frustration, but honestly, it really just came down to build time. It's difficult to work with a high build time. It's frustrating, slow, and unproductive.
If you can, I'd dedicate some time to improving your stack's build time. There's certainly a number of options you can look into to avoid re-compiling all of your dependencies on every new build.
My guess is the people who have zero issues run very dependency light, but my experience is a project that has grown dramatically will definitely grind to a halt with babel/webpack over time. Transpiling thousands of files is not instant.
This was the plugin I looked into, which essentially solved the issue for me.
https://github.com/mzgoddard/hard-source-webpack-plugin
If that doesn't work for you for whatever reason, there's the DLLPlugin and the DLLReference plugin to look into, just find something that works for you. It is definitely a solvable problem.
This may be a bit overly dramatic, but everyday you don't solve your build time issue, you can consider as throwing another 2 hours down the drain. Once you solve the build time issue, I think the other complaints will seem like minor things you can live with.
2
u/marosurbanec Dec 02 '16
Dude, I will build a statue in your honor!
After hard-source-webpack-plugin: full build 5s, incremental build 1.3s.
Christmas came early this year!
1
u/sdihgusdoiu Dec 03 '16
Awesome! Glad to hear it worked out. I felt the same way when I found it. =)
Waiting minutes for a compile really wears you down after a while, hope this makes it more enjoyable again.
1
u/YEPHENAS Dec 01 '16
I shared your frustration, but honestly, it really just came down to build time
Isn't JavaScript an interpreted, dynamic scripting language? Why does it have build time?
1
u/sdihgusdoiu Dec 01 '16
The modern javascript tools he's talking about - babel/webpack require a build step.
Babel transpiles shiny new unsupported functionality that isn't yet added to the language into "vanilla" javascript.
Webpack bundles all of those files into a single file to be served to the browser.
1
u/Jafit Dec 01 '16
What is the result of all this? Are you building single-page-apps? How much Javascript do you end up sending to the browser?
It could be that the best answer to your problems is to throw all this bullshit out and go back to basics. Send HTML and CSS to the browser, and treat Javascript as an optional enhancement.
1
u/marosurbanec Dec 01 '16
Yes, a SPA. Bundle size is another thing that makes me sad...
Unfortunately, none of that was my decision, I am stuck with the stack described in the OP.
1
u/Jafit Dec 01 '16
Try to get your bosses to watch these:
https://www.youtube.com/watch?v=4bZvq3nodf4
https://www.youtube.com/watch?v=RWLzUnESylc
1
u/PedanticGeorge Dec 01 '16
Is this...normal?
As far as I understand, yes. You can be thankful that you are not in one of the teams working with Angular 1 or 2.
How do you cope it?
Move to server-side development or build something fancy enough to be hired as the lead-dev on a front-end project so that you can use whatever tools you want.
How is this clusterfuck touted as a state of the art in Javascript?
Babel and webpack are, imho, state of the art javascript. Because they allow you to seamlessly write ES7 instead of early-stage ES5 and can compile it down to early stage ES5 (e.g. sutff that is supported by IE). This is good because of three reasons:
-> Code is readable (although not when running it, but debugging it is still about 100x better than debugging most template related errors I've encountered)
-> Code is written in such a way as to be much faster in 2-3 years. Since in 2-3 years time most browsers will support ES6 and its reasonable to assume some es6 features will work faster than the es5 hacks used to implement them. So you can just go back, change a single parameter in your webpack config, have babel compile to es6 and bam, 2 years later you website just got twice as fast, without you doing jack shit.
-> You write code that will be the standard JavaScript a few years from now when (hopefully) all browsers will have adopted the es6 standards including import/export (which as far as I know have been moved to es2016... but at this point I don't even know).
As far as React, React Router, Redux, Lodash and Mocha go... well, you need a testing framework for most things. You need a routing library unless you want to manage the history API by hand, why you are using React/Redux/Lodash instead of writing plain JS code though ? I can't tell, but most front-end devs seem to be bad at js code and decent at js frameworks. So unless you want to work as a lone hermit better get used to them.
1
u/marosurbanec Dec 01 '16
Thanks for a load of good advice and explanations.
I actually did move to server-side, but still peek at our front-end at times.
However, even with all that you have written above, I doubt anyone would adopt such a stack if his/her money were at stake.
We spend couple of months researching which NoSQL DB to use for our intensive data-processing, weeks of discussions whether to use Oracle Java or OpenJDK or Azul. The front-end stack? One guy's decision.
3
u/sumdudeinhisundrware Dec 01 '16
Find a new job. Whoever came up with that stack is a drooling idiot.
3
u/MartinMalinda Dec 01 '16
These are the situations where Ember and Ember-CLI shines. Maybe it's not as great and powerful as the most optimized and customized webpack/react build, but it is great out of the box.
Ember-CLI does so much for me, builds fast, can be extended with addons. When it comes to tooling I really have nothing to complain about in ember land.
2
u/Senthe Dec 01 '16
This this this. Just use Ember-CLI and suddenly you have zero problems with builds, tests, assets and all that shit. I can't be more grateful, I hate configuring everything in Webpack when I don't even know how exactly Webpack works, I just want it to work and let me write my code in peace.
1
9
u/flitsmasterfred Nov 30 '16
I coped by moving carreer; doing python on backend now; python 3 and Django are pretty glorious way to make money.
4
u/paooolino Nov 30 '16
what would you use for building a single page web app? Django and Python are fantastic, but it's all about the server-side.
8
6
u/muyuu Nov 30 '16
Maybe not doing everything a single page web app? I think Angular does the trick, but then again I'm stuck in ~2015 because it's really tiresome to do stuff in the front-end, esp. when your main job is something else entirely (C++, functional languages, etc). It's just a bit of a nightmare how quickly things go "out of fashion" ever since I made my first "interactive website" in the late 90s.
13
u/seriouslulz Nov 30 '16
You rarely need an SPA anyway
→ More replies (1)5
u/ninepointsix Nov 30 '16
No one needs it. But it certainly improves the user experience on bad connections if the entire UI doesn't disappear for big chunks of time every time you click on something.
8
u/The_yulaow Nov 30 '16
Browser cache already solved that problem years ago. Today you should use an SPA only if you are building a Googledoc-like application on the browser. Imho.
→ More replies (1)2
Nov 30 '16
I think he is recommending letting that be somebody else's job.
I would recommend looking into elm. I only have a small amount of experimental play with it, but this has already surprisingly impressed me a whole lot. I heard a podcast about it that got me more interested it it. They explained how the focus of elm is all about the user experience, the user being the programmer. They actually remove features that add too much complexity and focus on just the ones that make things easier for the programmer. There is a huge focus on the experience of getting started with it. They focus on constantly improving the compiler error messages so they are as helpful as they can possibly be. Companies are reporting using it for over a year in production without ever experiencing a single javascript exception. The point of the strict but flexible type system and compiler is that if it compiles, it probably just works. You need to write a lot less tests to verify behavior, the compiler does a lot of that for you. I had some aha moments where I realized I have been implementing a compiler in my tests, but then reimplementing that part of the compiler for each part of my code as more tests. In elm they just have a compiler for that stuff. When developing, you can just have the elm reactor going and then just visit pages in your browser. Any needed compilation will happen automatically and any compiler errors will appear in the browser. Then all you have to do is actually read the message and it tells you exactly how to fix the problem. I'm not sure if that would really scale for a real app, but going through the official starting tutorials was nice. Oh and that is another thing. The official docs have really nice getting started tutorials that both help you to get started, explain the core concepts, and help you understand why the type system and compiler are helpful things. In my career I have gone from loving types, to hating types, to realizing types can be a good thing when done properly like elm does. Before trying elm I had almost no experience with functional languages and was kind of scared of the idea, especially since Elm is compared a lot to Haskell which is notoriously confusing to learn at first. Another thing that impressed me about Elm is the way they encourage you to get started with it in a real project. Normally with a new technology I have this hope that I can slowly introduce it, only to find out I can't and I would have to rewrite an entire project with it or start a new one with it. Well with Elm they say all the success stories they hear are from people gradually introducing it to an existing project. So yeah try it out.
2
Nov 30 '16
Is elm full stack? I heard about it, only good things, but whats about frontend and backend? Also, how about reliability, js frameworks go out of date or support like crazy these days, is Elm interprise ready? If not is it at least freelance ready, or is it only for personal projects and just solo playing?
→ More replies (2)1
u/flitsmasterfred Dec 05 '16
We don't do that 'full stack' nonsense; server-side and front-end are so different so we have other people to wrangle with JS/CSS.
→ More replies (1)1
u/vcamargo Nov 30 '16
I'd genuinely like to hear the story about this change. Would you mind to share with us?
1
u/flitsmasterfred Dec 05 '16
It kinda happened, started at the company as technical front-end, some changes in workforce left a gap in the python group and I rolled into it and got hooked on python. It is extremely expressive and productive, especially with django. I still dabble in node.js but is is painful and annoying for anything substantial.
1
u/Mestyo Dec 01 '16
If things were that much better back in the days, then why are you using modern tools? I cannot for my life understand why anybody would want to go back go writing jQuery-spaghetti, but if you like it so much, why don't you?
I'm intrigued as to why so many people who have bad experiences with modern tooling complain as if it's somehow the communities' fault. You don't have to use anything, you know. And if your experience is so bad while others praise it, don't you stop to think that maybe you are doing something wrong?
2
u/djslakor Dec 01 '16
Because he hasn't learned how to use the modern tooling.
2
u/marosurbanec Dec 01 '16
No, that's not it. There isn't really that much to know about React, Redux or ES6/7, unless you go to esoteric usage of generators in redux-sagas and things like that.
Previous stack: RequireJS, React, Flux...roughly the same features, none of the problems above. I just can't see how is the "modern" JS an improvement.
2
4
u/nickgcattaneo Nov 30 '16
Our frontend is react + all the normal automation (webpack, karma, etc). I also just started using webpack-dev-middleware so I can have some control over how webpack is deployed (short of just devserver and default config) since we are also emulating a fake backend with custom callbacks for various XHTTP requests. Everything has worked flawlessly thus far. If you're hitting these issues it's probably because it was configured incorrectly or the developers don't understand what is actually happening under the hood of these various technologies.
4
u/djslakor Nov 30 '16
We use the exact same tooling (mostly via create react app, so it wasn't hard to get going). I'd add on the backend:
Node koa.js passport.js sequelize.js
We're using async/await in harmony (node 7) and Koa 2. I have to admit, I love this stack. Once you get going on it, it's a lot of fun. Over time, boilerplates will, I'm sure, get even easier.
"Nowadays it takes Webpack longer to build a todo app than for a complex Java project to download all dependencies, clean project, compile all files, run all tests, create a package and upload it to repository."
bullshit.
7
u/SkaterDad Nov 30 '16 edited Nov 30 '16
What kind of computer are you seeing such long build times on? I've noticed slowness like that on my work computer, but I like to blame it on Symantec Antivirus. At home, my babel/webpack builds are nearly instant (including hot reload). I'm not running a test suite, though, so perhaps that's affecting your builds.
As for npm being slow, that's certainly a thing. Particularly if you're behind a corporate proxy. You could consider trying yarn, which is an alternative package manager that streamlines the download process quite a bit.
2
Nov 30 '16
I've been trying to enter this space too, coming from .NET. There are some things I like, some things I don't.
Part of the problem is that the tooling is still getting sorted out. You bring up webpack. That used to be a simple straight forward tool that would merge all of your JS files into a single one. That's pretty usefull. But then you also had gulp, and bower. Bower being a package manager for client side scripting (bower install angular, which tells npm to grab angular), gulp being your client side task runner. Serve this page, run this task, etc.
On top of that, there is all the tooling you have to figure out, and debugging can be a pain. Should you use the chrome debugger, the Node debugger, etc.
And it's all changing all the time. It's getting better though. I think.
2
u/tech-ninja Nov 30 '16
I'm not going to lie it takes time to understand the whole thing. But once everything it's configured nicely it's fun to work with.
The problem comes when a team tries to adopt it while they are learning and there is no expert helping them along the way. They obviously don't set up things properly and end up with a semi-working build like yours. It happened to me in my last job.
Now, I'm working on a new project and I took the time to setup things properly and coach my fellow team mates and it has been pleasant experience so far.
2
u/martinsoderholm Nov 30 '16
Haven't tried Webpack yet as our setup with jspm and gulp works fine. There's no hotreloading, but we use gulp to watch for edits and pre-transpile files in ~1s, so the longest waiting time is browser reload and app init, which takes about 2-3s. In that time it initially loads a pre-compiled vendor-file with all 3rd party libs, and then about 60-100 transpiled project files.
Let me know if you want more details on the setup.
5
u/djslakor Nov 30 '16
He's being dramatic. I use webpack all day on a huge JS app and my changes show up instantly without reload in the case of a CSS change, and within 1-1.5s in the case of a necessary reload (create react app doesn't have HMR enabled).
2
u/vitomd Nov 30 '16
I think one of the problems is that sometimes we just need vanilla js to solve a problem but people add react/redux/webpack that increase the complexity. Even Dan Abramov said that "you might not need redux " https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367 the same with other frameworks and tools
2
u/bobvila2 Nov 30 '16
I think you probably don't have a handle on the tools you're using which is fair because it's a lot of tools to pick up at once. Once your team fully understands the stack you'll probably be happier.
2
u/sittingprettyin Dec 01 '16
I recently started playing with Polymer a bit, and then thing I love the most is zero build steps. Seriously. Nothing to compile whatsoever. Granted you need to vulcanize things before deployment, but for dev, just reload the page. :)
2
2
u/alexward1981 Dec 01 '16
It sounds to me like your build process is screwed up. One of the problems with NPM and build scripts (especially within a team) is that the build can become bloated very quickly indeed.
I suggest that one member of your team is assigned to be the 'build guy' with someone else as the 'backup build guy' in case the first is ill/on holiday/dead. That person is the gatekeeper who determines if something makes it into the main build process.
Also - assuming your schedule permits this - from time-to-time go through your packages.json file and work out what packages are no longer being used and check for duplicates (you'd be surprised how often things end up in both dependencies and devDependencies).
Next, hook your repo up with a tool like gemnasium to make sure your packages are the latest versions. It could be that some of your issues come from using an outdated dependency.
Lastly. You have to remember that many of those tools are designed for building a SPA, if your package is taking forever to build even after you've done all the above steps, it's possible that you're just not building things correctly. Can your project be broken down into sub-projects? Or even componentised (which it should be anyway) in that case, you can have your build process only focus on global components and the actual component you are working on at the time.
2
4
3
u/wolter99 Nov 30 '16
I also don't find hot module reloading especially useful. If you're using a front end router it's not like you have to navigate deep into the app every time you reload the page, so it really only saves you from hitting f5. For css, I find editing styles in devtools better than in my editor and hitting f5 to clear out the in browser styling edits is part of my workflow. So HMR gives me very little. I kind of think it's something someone made just because it's cool. It is cool. But I don't need or want it tbh and whenever I start on a new project and see they have some specific code in their app specifically to handle hot module stuff it annoys me because I feel I have to spend time learning how it works despite it not helping me in any way. This happened just the other day with cyclejs, which required me messing around with my babelrc file just for hmr.
Please stop adding things to your project just because everyone else is using it.
2
u/self_refactor Dec 01 '16
You, sir don't deserve a medal. All the modern JS tooling is consisted of amazing software products and even if you don't like them, your rant suggest lack of respect for the creators.
2
u/hhh333 Nov 30 '16
I come from Python and I worked on large AngularJs projects for a top 500 company and this was pretty much my overall experience.
Yes it was slow, painful to debug and my general feeling was that is was like building a sandcastle on moving sands.
Normally I would attribute this kind of things to my lack of knowledge about JS, but at the time I worked with a large established team of JS developers.
And these were quite competent developers, but the development tool chain always felt klunky or out of date however hard they tried to make it lean and usable.
Personally I started to hate the JS ecosystem for its lack of cohesion. It's sad because there's a lot of good things to JS, but the second you make a commitment to a stack or a module, it's outdated or surpassed weeks later.
I'm also all in for separation of concerns, but I think that the JS community is pushing the atomicity of the dependencies to another level.. with which flirts with insanity.
I think the lack of standard library is partly to blame for this.
* Edit: OK, hate JavaScript was maybe a bit too much. I do like JavaScript, it's a wonderful language. But for large projects, not my cup of tea.
→ More replies (3)
2
u/WoollyMittens Nov 30 '16
K.I.S.S: Keep It Stupidly Simple
2
u/djslakor Nov 30 '16
It is once you get everything going. Other platforms are complicated if you looked under the covers, too. The only difference is, in JS land we can see how the sausage is made a little easier.
1
u/WoollyMittens Nov 30 '16
It amuses me that every other science applies Ockham's razor. Except computer science, where it is often regarded as a sign of weakness. :D
1
u/one_user Nov 30 '16 edited Nov 30 '16
I agree that JavaScript is still lacking a lot of advanced programming environments and tools that other programming languages have had long time ago, since the times of Borland C, Visual Basic, Delphi, or even before. But at the same time, the good thing about JavaScript is that is very organic. Tools and frameworks come and go. Here, hoping to have your tools chosen for you is no longer an option. Now the job of the developer is also finding and using the appropriate tools and libraries. If all these new webpack/redux/whatever tools doesn't fit you, you are free not to use them, maybe they were written to solve problems that you don't have. That is the beauty of the JS ecosystem. Many libraries are first coded for solving one specific problem and then shared for others to use in case they have the same problem. In the old days, everyone would code their own solution in his own way, and keep it to themselves, but that is no longer needed. And finally, what if these libraries/tools allow you to do things that you couldn't do before?, what if these libraries or tools use concepts that could totally change the way you program for the better in ways that you can't even grasp now?
1
u/tracer_ca Nov 30 '16
This is one of the reasons I went with DoneJS in our organization. I don't want to have to worry about the Framework. Let someone else handle that for me. Live Reload works well and it's instant. Testing also sorted etc. Huge time saver. But yeah, it's not popular and a lot of people havn't heard about it.
1
u/Defualt Nov 30 '16
At least your co is pointed in the right direction. I'm stuck in angular dependency hell, broken stacktraces from a bad gulp setup, half django half angular product. Sorry about your hot reloading. That shit is annoying. Get them to add a flag to turn it off.
1
u/Lakelava Nov 30 '16
I hate the "makes it easy to reason about", basically what the person is saying is that "It is easier for me, therefore it is just better", but what is easier for someone may not be easier for everybody. Think about how much code was written for flash, and is all dead now.
1
u/DzoQiEuoi Nov 30 '16
Sounds like you have a bad Webpack setup.
If you get a better understanding of how Webpack works you'll be able to configure it for near instantaneous hot reloading and proper sourcemaps.
1
Nov 30 '16
We have 150k LOC in the front-end. Webpack needs minutes to build that.
I read the whole documentation and applied whatever I found. Maybe I missed something. But it is frustrating.
2
u/DzoQiEuoi Nov 30 '16
If your hot updates are taking minutes then something is wrong. It should be one or two seconds no matter how big your app is.
The initial build will take a little longer, but again if it's minute then something is probably wrong. The likes of React and Immutable are bigger than the apps any of us are likely to be writing, but Webpack can build them in seconds.
→ More replies (1)1
u/TheLarkInn Dec 01 '16
Hey feel free to reach out on our github, there is some linear size to length for initial builds but let's work together to figure out some better build speed options for ya.
1
u/treespace8 Nov 30 '16
What kind of application needs this kind of stack?
I'm writing an electon desktop client app, lots of screens and functions, and the most complex thing I use is angular 1.x.
1
Nov 30 '16
What drove me mad recently: publishing beta versions on npm and deprecating stable releases while not updating the documentation. One of the most famous packages at the moment.
I don't get it.
1
u/jimjkelly Nov 30 '16
There seems to be a lot of great advice in this thread, one thing that I found frustrating though is that with the speed that the ecosystem is moving (which is great - it's improvement!) it can very hard to tell what articles are out of date on the intarwebs and what works together well.
Does anyone have any suggestions for something to use as a reference for a current best practices set up? Last time I set up a new project I spent most of a day trying out a bunch of things that mostly worked until settling on a setup that still didn't have a working HMR setup. :/
1
u/TheLarkInn Dec 01 '16
We have a new docs page for webpack webpack.js.org try and check out our two guides on HMR! If they don't help you then we are doing it wrong.
1
u/Bloompire Nov 30 '16
The one thing I cannot stand is when I develop large application build of several components. One project I am developing uses 4 webpack configurations, so before I start to write a single line of code, I must open 6 terminals with 2x webpack watch, 2x webpack dev server and 2x nodemon for two application layers.
Is there a way to simplify this process? Perhaps there is some tool that allows me to save configuration and make that "bootstrap" process before starting developing quicker by just launching single thing?
1
u/TheLarkInn Dec 01 '16
You can actually export multiple webpack configurations as an array, this may be a better solution, and then link them together in your existing repo. Or a mono repo for your comp library could help too. Feel free and submit a github issue and maybe we can make a proposal for something like this.
1
u/Bloompire Dec 01 '16
I've tried but it affects build performance and also it doesnt really fixes issue because I need some of configurations to be 'watched', and some turned with webpack-dev-server. Also I need two instances of nodemon's.
I could make an .sh script that launches everything in background, but I sometimes need to look at console or restart one of these processes. So I am stick with everyday boilerplate involving launching 6 terminals...
I was even thinking about writing a tool that parses some configuration file and launches several different command line tools in some UI interface at once, allowing to check console, restart processes and so on. But I dont have time to do it now unfortunately :(
1
u/lechatsportif Dec 01 '16
the source map issues are babels. same stack but typescript yields no problems for me and instant hot reload. also make sure 3rd party deps are not added to your main bundle.
1
u/Dooey Dec 01 '16
Is your babel being configured to compile all of your node_modules? That's a common mistake that causes build times to increase a lot.
1
u/Majache Dec 01 '16 edited Dec 01 '16
Seems like every hype driven developer wants to be that guy who writes in brainfuck so we slowly adopt this shit instead for job security.
Out of all of this bullshit, I'll only tolerate babel for that sexy syntax. Webpack can go fuck itself, I wasted 2 days trying to implement a working system and the angular 2 webpack tutorial on the damn angular 2 site, didn't even work.
When I started with angular 1 early janurary, it was pretty easy to get all these amazing features loaded up with grunt and bower. Half that shit's already deprecated and I don't understand why. It worked, pretty well. I don't have time to maintain that stuff, and with our company going towards typescript, I have to get a proper livereloading compiled virtual build folder and production ready minified dist folder, task runner setup.
1
u/djslakor Dec 01 '16
Half that shit's already deprecated and I don't understand why.
Well whose fault is that? The new tools are better. If you don't understand them, that's your problem.
1
u/Majache Dec 01 '16
Half that shit's already deprecated and I don't understand why. It worked, pretty well.
At least get the context right.
Yea cause the new tools are so much better /s
Maybe I just don't see the appeal but after learning the newer tools. I'm entitled to an opinion that the majority of them don't solve any major problems.
→ More replies (1)
1
u/wisepresident Dec 01 '16
yes, integrating aurelia into an existing java project was a pain in the ass. when it was running, my ide was too slow because it now had to many folders to keep track of, compile time also trippled because it just had to index those folders as well and when I made code changes it wouldn't redeploy automatically because of the sheer amount of folders. to make it somehow work I had to rewrite most of the build process and it still sucks.
I feel you, although I still make fun of java developers, they have choice and yet choose java.
at least with js there is no choice, yes you can compile to js but when executing it is still bound to the js language features.
1
u/acemarke Dec 07 '16
/u/marosurbanec : one additional follow-up: it looks like Webpack 1.14 fixes some issues with sourcemaps, per https://twitter.com/dan_abramov/status/806476274730496008 , https://github.com/webpack/source-list-map/pull/2 , and https://github.com/facebookincubator/create-react-app/pull/1188 . You may want to look into that if you haven't already.
1
u/Glaaki Nov 30 '16
Web front end technology is reinventing every ui innovation since Xerox PARC.
Still waiting for RAD-Web IDEs. :)
1
u/amilner42 Nov 30 '16
This is one of the reasons I switched to Elm, it's much much simpler, check it out!
Some people will tell you what other tools to use and the list will pile on, but simplicity is itself extremely valuable and it can't be solved with more tools...
Check out Elm, have your mind opened :)
→ More replies (1)2
u/djslakor Nov 30 '16
I'm sure there's a huge community and ecosystem of prewritten goodies for Elm too! /eyeroll
1
u/neoginn Dec 01 '16
Big Company employee here. We had a stack exactly like this. It was nuts. I understand what you are feeling. The learning curve for each module can be daunting at times. But this is where the effort to move to Angular2 paid off for us in a big way. Lucky the switch to from React to NG2 is fast. The part thats going to suck beyond belief is figuring out your little obscure libraries folks have been into your application.
The React based stack in my opinion all feels like a hack.
NG2 feel enterprise and well thought out, its the easy choice for big businesses now.
Webcomponents with real HTML5 understanding and es6 feels amazing.
I think that the clusterfuck of libraries are slowly winding down, and a convergence of pressure is being put on the Browser owners, Library stack owners, and Business needs which fuels a more harmonized stack.
Check out webcomponents and html5 again. Pure ES6 s easy enough. you do not need transpilers. its Ecstasy compared what the y got you doing.
Or just tell them to man up and us NG2.
1
Dec 01 '16
I really have the opposite feeling with NG2. Typescript setup is baffeling to me.
Then again you pretty much need the same tooling stack aside from that. You need a bundler (webpack, browserify or system) you need a transpiler (Typescript, Babel). And yes you DO need transpilers, browsers don't support most of ES6 yet.
NG2 feels enterprise? No way, it's too overengineered and not transparent.
Really if the React stack felt hacky, then you set it up wrong. I really don't get the misconception that NG2 is more enterprice. It became a kind of forgotten project at Google when they tried to push Polymer, they just leveraging Angular 1's success now. People want to hype about well know names.
And by the way, I work at a big company too and the React redux stack works amazing for us.
1
u/kdesign Dec 01 '16
NG2 just came out (I don't take into account the RC's which were actually alpha versions), wait until people will bump into its automagic in large projects. Good luck with changing its default behaviour.
→ More replies (1)1
u/Majache Dec 01 '16
I'm curious what type of task runner setups you're using, I imagine gulp? My coworker went ahead and made a concept site to start rapid deployment with, and i just want to clean it up and add at least some task runners to it because he currently has none. Coming from grunt and all its deprecated plugins I'm having a hard time finding working gulp configurations. Also the angular-cli is still in beta.
0
u/SustainedSuspense Dec 01 '16
Learning an entirely new stack sucks. Give it time. I never want to go back to the days of Angular 1 or PHP.
1
u/marosurbanec Dec 01 '16
Previous stack: RequireJS, React, Flux...roughly the same features, none of the problems above.
Imho, outsourcing your build pipeline to black/white-box open source components is a ticking time bomb.
0
u/nonagonx Nov 30 '16
That's why I haven't adopted most of the new technology. I don't need package managers because I manage my own frontend code with manually added scripts inside my main html file. I find it satisfying to know that the javascript I'm editing is the same javascript thats run in my application. That's the problem with these tools, building the source into a giant app.js file makes debugging impossible and sad. I used to have these problems with Require/Browserify and yes hot loading took forever. Just get rid of it and do it old-school like me, just my opinion! I still love React but I even ignore most of the new ES6 stuff, because you can't force me to use something just because its new and popular.
3
u/w4rtortle Nov 30 '16
You're going to shoot yourself in the foot a bit with this attitude imo, es6 makes some things so much easier. And debugging in react/redux is easy as fuck.
1
-8
u/notanotherone21 Nov 30 '16
all pretty standard
No it's not. My company uses none of those.
my daily productivity plummeted. Honestly, I feel like x86 Assembly must have a friendlier set of developer tools.
Absolutely it did. I could have told you it would.
Is this...normal?
Yep. Absolutely!
How do you cope it?
Don't use any of that crap.
How is this clusterfuck touted as a state of the art in Javascript?
People don't have a foundation of knowledge and, therefore, rely on other people's tools touted on reddit instead of in-depth knowledge of how to program.
6
u/Thought_Ninja human build tool Nov 30 '16
This is actually a fairly standard stack. Doesn't mean everyone is using it obviously.
Also, it's more than manageable if you actually take the time to understand how all of your tools work. This goes for everything in tech.
I don't agree with your mentality of building such things with grit and elbow grease. Why reinvent the wheel when there is a strong, open source version available to you?
If you get it right, it can be a great experience, but that requires a depth of knowledge of the language and tooling that few have the patience to develop.
This isn't to say that the tooling is perfect, it definitely has its quirks, but by focusing attention on tools like webpack, we drive the community towards a more standard approach to development.
On mobile otherwise I would go on =)
8
u/notanotherone21 Nov 30 '16
Why reinvent the wheel when there is a strong, open source version available to you?
Who reinvents the wheel every time a new project comes along? Our tools were developed years ago, long before anything on that list came along, and are tried, true and tested; fitting better with our organization than anything else.
requires a depth of knowledge of the language and tooling that few have the patience to develop.
That's exactly the problem I pointed out. People lack the foundation of knowledge.
by focusing attention on tools like webpack, we drive the community towards a more standard approach to development.
So you need to use webpack to have a more standard approach? No. And this is the common reddit-type fallacy I also mention.
2
u/Thought_Ninja human build tool Dec 02 '16
Who reinvents the wheel every time a new project comes along? Our tools were developed years ago, long before anything on that list came along, and are tried, true and tested; fitting better with our organization than anything else.
You're using a set of pre-existing tools like anyone who starts building a project using a well supported open source tool. My comment isn't a personal attack on your team's methodology.
That's exactly the problem I pointed out. People lack the foundation of knowledge.
I'm in strong agreement with your thoughts regarding reliance on other people's code. It's a big issue in the JavaScript community; developers are constantly asking 'What's the best framework to learn?' like frameworks are some sort of magic wand that makes applications.
In the end, all JavaScript frameworks are built with JavaScript, and if one cant read and understand the source-code of the framework they are using, then they shouldn't use it.
So you need to use webpack to have a more standard approach? No. And this is the common reddit-type fallacy I also mention.
WebPack? No. React? No. However, both have spawned and inspired many similar implementations to solve similar problems. Well built and widely adopted open-source solutions are undoubtedly a major driving force in the development of new design patterns and standardization of best practice.
I recently built out our JS stack, tooling, and UI component library using some of those technologies. The architecture is easy to reason about, incredibly flexible, and efficient. Initial build takes about 5s and it rebuilds in under 300ms. Our application payload size went from 1.3M to 112Kb.
3
Nov 30 '16
I don't agree with your mentality of building such things with grit and elbow grease. Why reinvent the wheel when there is a strong, open source version available to you?
Because the time it takes to sit through build tasks, configurations, and other mind numbing stupidity everyday is tech debt. That daily debt (plus the emotional holocaust) more than qualifies the expense of rebuilding a wheel one time. Just because you are using a framework doesn't you are free from errors or disappointment. If I am going to be so horribly disappointed at the very least I can waste less time doing it.
8
u/Senthe Nov 30 '16
A week ago I was implementing a calendar/timepicker in Ember. Pretty standard thing for a webapp. My coworker was like "okay just use some calendar jQuery plugin".
Except jQuery plugin would be a total disaster in Ember. So I wrote a calendar myself, using Moment.js. Rendering days, labels, changing months, and all that super basic stuff.
It took me 8 hours. And it worked just like I needed it to, with selecting, binding to other data etc. I didn't have to spend this time with some other person's crappy plugin and its configuration, modification and adjusting to my needs. I just did it. You may call it reinventing a wheel... For me it was 100% worth it.
→ More replies (8)
172
u/acemarke Nov 30 '16 edited Nov 30 '16
That was definitely a rant, but it was at least coherently written, so I'm going to try to give it a straightforward response. In order:
Dependencies: Yes, a stack like that does involve a noticeable number of transitive dependencies. There's several reasons for that. One is that the Javascript world, for better or for worse, usually tries to break things into small modules. For example, Babel went from being a single tool that had all the parsing and transformation logic built in, to a plugin-based system that has one plugin for each individual bit of syntax that can be transformed. Another thing to keep in mind is that those tools constitute an entire compiler toolchain. If I was trying to compile, say, a Qt application on a Linux system, half of the headers and libraries would have been preinstalled on the system, as well as GCC. The Qt develop package may or may not be preinstalled, but would also constitute a pretty hefty chunk of dependencies. With Javascript, you're basically pulling down an entire compiler+linker+libraries chain for each project, which is both good and bad.
Also,
yarncan definitely help with project installation times. It has a more organized approach to downloading dependencies, caches downloaded packages on your machine to speed up later reinstalls, and can also be configured with an offline mirror option to save a project's dependencies for committing into the repo.Build times: are you referring to the time needed to do a complete production build from scratch, the time needed to start up a Webpack dev server, or the time needed to do an incremental build? There are definitely ways to improve the build time for Webpack. This can include pre-bundling vendor libraries, configuring Babel to only transpile syntax features not yet fully supported by modern browsers, etc. I have a list of Webpack build optimization articles in my React/Redux links list that can help with that.
Hot reloading: I'm curious - what are you comparing the "5 seconds" to? My previous app, which was built in GWT, took multiple minutes to recompile in dev mode, and every change required me to log out, edit and save, log back in, and wait for the recompile. While hot reloading certainly isn't absolutely perfect, the fact that it exists at all is a huge improvement in dev experience. Also, if you look at the browser console, it should be reporting when a recompile was detected, which files were affected by the reload, and whether a full reload is needed or not.
I'm also curious how you have hot reloading set up. There's two main approaches: "plain" HMR, which simply uses the
module.hotAPI to reload your entire component tree from the root component, and tools like React-Hot-Loader, which try to transform your components during compilation and wrap them withmodule.hotcalls to do more targeted reloading. RHL mostly works, but still has a number of edge cases, which is why I'm just using "plain" HMR in my own app.I definitely do have to do full reloads sometimes, but being able to do hot reloading for a major percentage of my edits is absolutely a time saver.
Syntax errors: I definitely have no idea what you're talking about here, and haven't seen anything like that. Webpack should normally display compilation errors in the console, and it's possible to set up error display in the browser as well.
3rd party libs: Yeah, got nothing there. Sinon just seems to be kinda screwy. Does seem like there's workarounds, though.
Source maps: Webpack supports a variety of different configuration options for source maps. I'm still not entirely clear on what all the differences in config options mean in practice, but I've seen a few articles that try to compare behavior and performance (see 1, 2, 3, and 4 ). I personally am using
devtool : '#cheap-module-inline-source-map'in my own app and it's working well for me, although a dev I respect recently suggested that for development you should just usedevtool: 'eval'.I have admittedly seen the "freeze while parsing the main bundle" behavior before.
Expressions: Hmm. Yeah, Babel certainly transpiles things, but I'm not sure what "inspecting" you're doing that's a problem. If I look at the variables list in the DevTools sidebar, it shows me the original names.
Tests: What kind of test setup are you using, and why/how are you running them in the browser that way? I admittedly am still kinda weak in the testing department, but I have my project configured to run unit tests offline under Node using Mocha and the
mocha-webpacktool.REPL: I'm not sure why you would want to "get a reference to a particular module". What are you trying to do there?
Redux DevTools: Okay, here I'm going to have to completely disagree with you. The Redux DevTools are amazing, and I use them on a moment-to-moment basis. I use them to view the current contents of my state, see the contents of actions, see how my state changed, and jump back and forth between the last few states to compare behavior. I'm not sure if you haven't grasped the value yet, or what your specific complaint about them is, but they are incredibly useful.
"Easy to reason about": Okay, yeah, the phrase is probably over-used, but there is a fair amount of truth to it. With React, a problem with the UI should generally be fixable by looking at the data used to render the UI, and tracing the dataflow backwards. Similarly, with Redux, a bad state should be understandable by looking at the sequence of dispatched actions and the reducer logic.
Also, because React and Redux force me to be much more explicit about managing my state, I've found myself thinking much more carefully about exactly what data I need to manipulate, why I'm changing it, and how it needs to change. As a result, I've had numerous occasions where I laid out the code for a given feature, and it Just Worked (TM) because I had to actually think through what I was doing rather than just slapping code together, and because React and Redux made the flow of that data predictable.
Final thoughts: Yeah, there's definitely still a number of pain points with the toolchains, but for me overall it's a huge improvement over previous setups I've worked with. I'm definitely curious what sort of prior apps and setups you've worked with, and what you're comparing this to.
As a last item, I'll re-paste the link to my React/Redux links list, which has links to lots of tutorials and articles on React, Redux, and related topics. That includes articles on things like optimizing Webpack builds, good test setups, and React/Redux app architecture. Maybe something in that list will be helpful for you and your team.