Fast and modern alternatives to common npm packages

Fast and modern alternatives to common npm packages

Written by Posandu Mapa on Jul 6th, 2022 Views Report Post

Have you ever waited a long time for webpack to bundle your code? Well, that's so annoying. But wait! In this article, you can find a list of fast and modern alternatives to common npm packages.

Webpack -> Vite

There is a bundling library called Vite. It currently supports:

  • React, Preact
  • Vue
  • Svelte
  • Lit

Vite is about 2 times faster than Webpack.

Babel -> SWC

SWC is a rust-based JavaScript compiler that is used by Next.js. You can find more information about it here.

Here is a benchmark of SWC vs Other Transpilers:

image

UglifyJS -> Terser

Terser is a fork of UglifyJS but it minifies JavaScript code more efficiently. You can find more information about it here.

NPM -> PNPM

Yes, we're replacing NPM with PNPM. PNPM is very fast and it's a lot more convenient than NPM. It's because PNPM creates a shortcut folder instead of copying the whole package. This way, your used disk space is reduced. You can find more information about it here.

Node-sass -> Sass

If you used node-sass to compile your Sass files you now can use sass to compile your Sass files. Also node-sass is now deprecated and will be removed in the future. You can find more information about it here.

Styled-Components -> Emotion

If you're using React and use Styled-Components, you can use Emotion instead. Emotion is a library that allows you to use CSS in your React components. You can find more information about it here.

Conclusion

Now you can save your time and can touch some grass.

Follow me on GitHub or/and Twitter to stay updated.

Comments (0)