Of course, those are approximate measurements and will vary depending on the computer. Let’s run a few benchmarks to understand its speed. You can inspect the contents by just doing. It contains all the imported dependencies. path-to.js we generate the node_modules.bun file. Let’s create a Create React App: bun create react. Let’s create a Next.js app: bun create next. It does provide some integration with the latest React ecosystems through their create command. We can use bun as a runner: # instead of `npm run clean` bun run clean # if added to the `scripts` in package.json bun clean To add or remove any package: bun remove react bun add preact Just like yarn it will use the existing package.json in combination with the lock file when present. If you are familiar with yarn or npm it comes pretty much to the same. As I mentioned previously it is still not production-ready. You will notice that it has not reached the 1.0.0 version yet. To check that it is all working correctly: bun -version To install bun you need to execute the following commands: curl -fsSL | bash # Manually add the directory to your $HOME/.bashrc (or similar) BUN_INSTALL="/home/jgranja/.bun" PATH="$BUN_INSTALL/bin:$PATH" You will get a one-time invite for the jarred-sumner/bun repository. There you can request the invite through writing on the channel I want bun. Once you join it, all you need to do is navigate to their #invites channel. You would have to join their discord here to get an invitation. The only way to inspect this lock file is via the command: bun install -yīun support as today the following loaders: We will have to deal with the downside of not being able to inspect easily the changes on the PRs. Why is it in binary? Because of performance reasons. Instead of generating a plain text file, it will generate a binary one. Just like Npm and Yarn create some associated lock files, so will bun. It is one of the most noticeable optimizations. One remarkable feature is that bun has its own node module resolver implementation. It still lacks some basic features like Source Maps, Minifier, Tree-shaking, and more. The bun tool does support out-of-the-box complex features like TypeScript, CSS in Js, JSX. ![]() Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.Įven if it was built from scratch, the developers have based their approach on the esbuild project. Instead of being written in Rust or Go like its top competitors, bun is built with Zig. It is now also a JavaScript runtime execution and is adding more features by the day. Update: the Bun tool has been made more exciting after the release of this article. In this article, we will check this new tool and where it stands with npm, esbuild, babel, and Webpack. ![]() It is not yet production-ready, but the future is looking bright for this tool. It does not just speed compilation and parsing but provides its own dependency manager tooling and bundling. It is meant to make the whole JavaScript development even faster. Recently, we saw a new player in the JavaScript tooling ecosystem: bun. The Vite 2.0 project is now using esbuild behind the scenes to deliver a performant building experience. Both were a real game-changer because of their performance. Shortly after, esbuild was announced and everybody was hyped about it. The SWC was one of the earliest tooling projects outside of JavaScript. Furthermore, there is no need for JS Developers to debug their internals. What would be the reason to keep the ecosystem tooling in JavaScript? Those tools are meant to be executed on the developer machines and not the browser. They are not single-threaded which is beneficial when dealing with lots of files. Languages like Rust, Go or even Zig have proven to be more performant than JavaScript for the bundling, transpiling, and compiling process. Tools like Webpack and Babel are seeing their relevance diminish by the day. The future of JavaScript tooling is away from the JavaScript language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |