It seems like yesterday Webpack emerged as the most viable option for bundling JavaScript. I still have a lot of tooling fatigue, especially since Rails really bought into Webpack.
Parcel does seem pretty great, but I feel like I'm still having a hard time with so much bleeding edge stuff in JS world.
How are you feeling about this tooling landscape, I'd love to just chat this out a bit.
Oldest comments (50)
I'm sort of expecting that Rails will lean into Webpack and forget about the new hotness, even if it's kind of great, which is fine for my world.
The good news is I don't think Rails will drop Webpack any soon, the goal is really to make it the default in Rails 6.
github.com/rails/rails/pull/33079
As for Parcel, I use it only when I need to test something really quick.
And, even then, there's usually
create-*-app
exactly. I am just missing the create-vanilla-app... or I don't know it :)
The best thing about JavaScript is also the worst: everything is in userland, which can tend to anarchy at times. However, it does yield (multiple) killer tools that everybody chooses from regarding which to use.
"Your greatest strength is also your greatest weakness."
I was thinking about trying out parcel... but for most of the stuff I just need webpack for vuejs + sass. I already have a working webpack config that I can just copy from project to project that works great.
I am tired of learning about more bundlers. I just want to build my apps.
"I am tired of learning about more bundlers. I just want to build my apps." Ah, best comment ever about bundlers.
// , What, no obligatory xkcd?
Parcel has really a very small learning curve. And if your feel parcel is gaining momentum you can invest in it
I agree - it does look super easy! The only thing is I know from experience that at some point there will always be "something" that doesn't work properly or "something" that is an advanced feature that requires more digging.
I'm trying to make sure my learning is very focused (using a plan) and parcel just isn't on there.
But again, I agree, it does look very promising and - at first glance - very attractive.
Care to share your plan, or at least how you planned? My learning is scattered and needs focusing to keep making progress.
still using gulp here!
I usually don't look much into new stuff until I've heard about it for a while and it looks like it's getting widely adopted, or I have a specific interest in it.
I didn't move into Webpack until I felt it was becoming the most commonly used bundler and I had some issues with Gulp.
So far I'm happy with Webpack and I haven't looked into Parcel or Rollup at all. Webpack solves my problems and it's still actively developed and getting good updates, so I don't see any reason to change.
I recently moved my portfolio site from create-react-app to parcel. Parcel is GREAT. I can't speak for how well it will work for large scale projects with custom webpack configs but for smaller ones I can see it working very well.
Parcel fits a niche in the tool ecosystem that is much different from the one Webpack occupies. Webpack is a very flexible and powerful tool, but this comes at the expense of complexity. I'd argue a lot of complexity. There's a reason that there exist so many tools that have the sole purpose of managing webpack configs and project structure. Parcel sacrifices a lot of this flexibility and power for speed and simplicity. It gives you default access to a lot of features that take time and setup in webpack. But if your codebase has specific needs that parcel doesn't understand, it may lack the flexibility needed to build your project.
I personally hope that parcel gains traction in projects with straightforward needs. If all you need to do is basic module imports and cache busting, webpack is overkill. On the other hand, if your build is very specific and complicated, parcel probably won't fill your needs. It comes down to making the tradeoffs that make sense for your situation. This is my experience as someone who helped implement webpack in a very complicated legacy codebase, and also someone who used parcel for some side projects that were small in scope and complexity.
Here are my two cents.
I've used it for small projects, but things got messy trying to use ES Modules without configuration, some third party libraries and Enzyme. I would still use Webpack or Rollup for large projects because doing something amazing requires some fine tuning.
There is no silver bullet in the JS world, and even if there was, you might still miss the target because everything is moving so fast.
What's the concern? Just because a specific tool exists doesn't mean you have to use it, or even have to learn how to use it.
It can be helpful to know that various tools exist, so that you can evaluate them later on if and when there's a need to make a decision, but otherwise it's totally fine to stick with your current toolset.
In this specific case, Parcel looks like it's got some interesting ideas, and it might be worth looking at if you're starting a new project from scratch, but there's no need to go throw out an existing project's build config just because Parcel exists.
This is all true.
And there is just a renaissace (or breakthrough) of brunch :D
Javascript tooling is really evolving in a fast pace. Which is in itself a good thing. People are working on improvements everywhere. For many different problems there are a variety of solutions to pick from. So in terms of supply and demand, it is a nice market.
The only thing which in my eyes causes problems is the overoptimistic attitude of people, trying to learn the latest and greatest in order to feel their skillset staying sharp.
It's a bit like developers became some kind of fashion victim: »Oh, what you are still using $blerg when everybody else is using $blarg. This is so 2017«.
Another problem I see is big insecurty: Becuase of having (too) many choices people are afraid of making the wrong choices (which is not even limited to the javascript ecosystem).
»What framework should I use to accomplish X?«
My standard answer to this:
»Pick the one you are understanding fast and feel the most productive with«
Most of the time, projects or companies die before they feel any serious pain because of wrong technological choices. And if they survived up to that point, they have enough money to pay people making the right decisions for them.
My approach to this in general, or parcel in special is purely hedonistic:
If I find a minute, I have a look at it and play with it. If not, it's okay - I know, it's there; and when webpack at some point in the future should make me cry (again), I'll give it a try. If it's fun, I'll use it. If I am bored. I leave it.
OTOH, I've been long enough in the industry to have learned, that all tools/languages are in one way or the other "crap". And sometimes it is better to stay with "crap you know". There are less bad surprises waiting.
I still feel the same as my last post on the topic -- I hate front end build processes.
My disappointment with front end processes is very influenced by using Visual Studio all these years. It has templates which automatically setup the build processes. Then the IDE does a decent job of keeping the build process up to date as you use it. Example, when you Add New File from the UI, it also adds that file to the build template. If you add a source file, it will be added to the compile list. If you add a content file, it will be copied to the output as-is. And you can adjust the behavior on the file's properties. In effect, file organization is a separate concern from file build settings... you don't have to put certain files in
static
and other files insrc
to get it to build correctly. Nor maintain build configurations for each file by hand.The IDE cannot do everything you might ever need -- in which case you can use the command-line build tools and scripts -- but it does a great job of covering standard cases. I've never really needed to write command-line build scripts until recently with .NET Core. And that is mostly to build docker images. VS added Docker image build support in 15.7, but I had major issues with it for multi-container projects. So I'm building the images with scripts.
But front end basically has very limited coverage of even common cases. You are expected to write custom builds from the get-go. It is such a large barrier to entry that many setup tools have sprung up such as Create React App to start you off right. If I take a lesson from VS, what we really need is some build template support integrated into editors so they can manage common cases and just let me worry about coding my features. Maybe "IDEs" are not so bad after all.