A breakdown of the most important JS dev tools in 2022, including their most relevant tradeoffs, and some opinionated advice sprinkled on top. In the world of software engineering, it’s important to have a firm understanding of the tools at your disposal. But the landscape of JS tooling is always changing at such a rapid pace. And 2022 is no different. So I decided to break down the most important dev tools that you should be aware of in 2022. We’ll start with the lowest-level tools and work our way up to higher-level tools from there. Let’s get started 💪 Compilers Compilers are responsible for transforming your input code into some target output format. For our purposes, we’re focusing on compilers which support transpiling modern JavaScript and TypeScript into specific versions of ECMAscript that are compatible with browsers and recent versions of Node.js. The most important thing to understand about this space is that it’s in the middle of undergoing a massive shift from compilers like and , which are written in higher-level interpreted languages, to compilers like and , which are written in much faster, compiled languages. tsc babel swc esbuild This shift results in as shown in this esbuild demo. 10-100x faster compilation times If you’re updating your devtools stack or starting a new project in 2022, then you’ll want to consider using one of these next-gen compilers under the hood. They may not be as mature as the official typescript compiler or babel, but the benefits of having 100x faster builds cannot be understated. Note that neither swc nor esbuild perform type checking. They simply transpile code into the desired output format as quickly and efficiently as possible. For the time being, if you’re working with TypeScript, you’ll almost always need to have the official TypeScript compiler as part of your toolchain to guarantee that you’re getting the most out of TypeScript’s static type checking. It’s also worth mentioning that the author of swc, is working on in order to remove the need for tsc in many cases, as it tends to be the bottleneck in most toolchains. kdy1dev porting tsc to Go SWC vs esbuild and are both excellent, blazing fast, open source JS / TS compilers. They have and are both used regularly in production by some of the world’s largest companies. swc esbuild comparable performance It’s likely that your choice between the two will be dictated more by the higher-level tools built on top of these compilers as opposed to choosing between them directly. Notable projects using : swc Vercel and Next.js Deno’s linter, formatter, and docs Parcel nx Notable projects using : esbuild Vite Nuxt.js Remix SvelteKit tsup In software engineering, convenient statements such as “technology A is better than technology B” rarely hold much value. Rather, you should try to always keep context in mind. In this case, there are many scenarios where you’d be better off using or . tsc babel Becoming a better software engineer often boils down to thoroughly understanding the tradeoffs involved with these types of decisions, and balancing those tradeoffs against the particular constraints of your project, team, and business’ needs. Bundlers Bundlers are responsible for taking all of your input source files and bundling them together into an easy-to-consume output format. The two most common use cases for bundlers are bundling libraries and bundling resources for web applications. Bundlers like and are the swiss-army knives of modern JS toolchains. They are both extremely extensible, with well-maintained plugins covering major use cases. It’s relatively straightforward, for example, to use any of the popular compilers listed above to transpile TS code with either webpack or rollup. webpack rollup , on the other hand, provides a mostly zero-config approach to bundling. It focuses on simplicity as opposed to extensibility and uses as a compiler under the hood. Parcel swc Note that and both provide basic bundling capabilities as well, though compared with these alternatives, they’re not full-featured enough to be included on this list. swc esbuild For a much more detailed comparison of these bundlers, check out . tooling.report Package Managers are responsible for managing dependencies in the form of packages. Package managers NPM There’s a here, but the TL;DR is: lot of history All of these package managers have similar features and perf nowadays, so don’t be too worried about which one you’re using. seems to be gaining a lot of traction very quickly. 💪 pnpm The way yarn berry was rolled out and the subsequent deprecation of yarn v1 turned a lot of people off from using yarn, though yarn berry has come a long way in the past few years. is an interesting approach, but in practice, it has only seen adoption in cases with very large monorepos. yarn plug’n’play I can’t tell you the number of times I’ve wanted to inspect or add console.log statements to my , and not being able to do so is a real disadvantage. node_modules Adoption by popular projects Library Development These tools are meant to help library authors bundle and publish modern NPM packages. If you’re developing a new library in 2022, you’ll likely want to use one of these higher-level tools to simplify your workflow. If you have a TS package and want to take advantage of extremely fast build times courtesy of , then is a great option. esbuild tsup If you have a TS package and need some additional features, then is a great option. tsdx If you have a TS or JS package, then is also a great option. microbundle is mainly a tool for building frontend web apps, but it also includes support for and is a very solid all-around option. Vite outputting libraries For monorepos, looks really promising. nx My personal preference will be to use for TS packages, mainly because once you’ve experienced 100x faster builds, it’s really difficult to consider switching back to anything else. tsup More Info Most of these tools don’t currently provide great support for TS monorepos which take advantage of . For the time being, my recommendation for this case is to use for type checking and generating typings (with ) and for compiling code in each of the sub-packages. For an example of this approach, check out the monorepo (one of my OSS projects). composite project references tsc .d.ts emitDeclarationOnly: true tsup react-notion-x Publishing modern NPM packages is a nuanced topic that goes well beyond the scope of this article. For more info on ESM, commonjs, dual-package publishing, exports, and more see: What does it take to support Node.js ESM? Sindresorhus’ notes on and ESM packages publishing consuming Web App Development These higher-level tools and frameworks are intended to help developers build modern web applications without worrying about all the details. If you’re developing a new web app in 2022 using , then I would highly recommend using . It has the best support, the most active community, and close integration with , the world’s leading deployment platform for modern web apps. React Next.js Vercel provides a really compelling alternative to Next.js. It’s from the makers of , and though it’s relatively new, they’re definitely a framework to keep an eye on. Remix react-router If you’re developing a new web app using , then and are both great options. Vue Nuxt.js Vite And last, but certainly not least, if you want something more light-weight, then give a try. 🤗 Parcel There seems to be a roughly equal number of projects building on top of and . The same observation goes for and . swc esbuild webpack rollup Conclusion Modern web development has evolved significantly over the past 10 years. Developers today are lucky to have such a wide range of amazing, well-maintained tools to choose from. This is, however, by no means a comprehensive list of dev tools. If there’s something missing that you’d like to see added, let me know on . twitter Hopefully this breakdown has helped you parse the most important aspects of the current JS / TS dev tools landscape, and hopefully it’ll help you to make more informed decisions going forwards. If you found this article helpful, then consider following me on twitter for more @transitive_bs