What is @esbuild/win32-arm64?
The @esbuild/win32-arm64 npm package is a binary package for the esbuild bundler optimized for Windows on ARM64 architectures. Esbuild is a fast JavaScript bundler and minifier. It compiles TypeScript and JavaScript into efficient code that can be executed in the browser or on Node.js. This package specifically targets the Windows ARM64 platform, providing native performance improvements.
What are @esbuild/win32-arm64's main functionalities?
JavaScript and TypeScript bundling
This feature allows you to bundle multiple JavaScript or TypeScript files into a single file. The code sample demonstrates how to bundle an entry file named 'app.js' into an output file named 'out.js'.
require('esbuild').build({
entryPoints: ['app.js'],
bundle: true,
outfile: 'out.js'
}).catch(() => process.exit(1))
Minification
This feature enables the minification of JavaScript files to reduce their size for production. The code sample shows how to minify an entry file 'app.js' into a smaller output file 'out.js'.
require('esbuild').build({
entryPoints: ['app.js'],
minify: true,
outfile: 'out.js'
}).catch(() => process.exit(1))
Transpiling
This feature allows for the transpilation of TypeScript files into JavaScript, making it possible to use TypeScript in environments that only support JavaScript. The code sample demonstrates transpiling a TypeScript file 'app.ts' into a JavaScript file 'out.js'.
require('esbuild').build({
entryPoints: ['app.ts'],
loader: { '.ts': 'ts' },
outfile: 'out.js'
}).catch(() => process.exit(1))
Other packages similar to @esbuild/win32-arm64
webpack
Webpack is a popular JavaScript module bundler with a rich ecosystem of plugins and loaders. It offers similar functionality to esbuild, such as bundling, minification, and transpilation. However, esbuild is known for its speed, often being significantly faster than Webpack, especially for larger projects.
rollup
Rollup is another module bundler for JavaScript which focuses on producing smaller bundles by eliminating unused code. It is similar to esbuild in terms of its bundling capabilities and support for plugins. While Rollup is generally faster than Webpack, esbuild typically outperforms Rollup in terms of build speed.
parcel
Parcel is a web application bundler that offers out-of-the-box support for many web development languages and frameworks, with zero configuration required. It provides similar functionalities to esbuild, including fast bundling and built-in support for various file types. Parcel is known for its ease of use, but esbuild usually has a performance advantage.
0.23.0
This release deliberately contains backwards-incompatible changes. To avoid automatically picking up releases like this, you should either be pinning the exact version of esbuild
in your package.json
file (recommended) or be using a version range syntax that only accepts patch upgrades such as ^0.22.0
or ~0.22.0
. See npm's documentation about semver for more information.
-
Revert the recent change to avoid bundling dependencies for node (#3819)
This release reverts the recent change in version 0.22.0 that made --packages=external
the default behavior with --platform=node
. The default is now back to --packages=bundle
.
I've just been made aware that Amazon doesn't pin their dependencies in their "AWS CDK" product, which means that whenever esbuild publishes a new release, many people (potentially everyone?) using their SDK around the world instantly starts using it without Amazon checking that it works first. This change in version 0.22.0 happened to break their SDK. I'm amazed that things haven't broken before this point. This revert attempts to avoid these problems for Amazon's customers. Hopefully Amazon will pin their dependencies in the future.
In addition, this is probably a sign that esbuild is used widely enough that it now needs to switch to a more complicated release model. I may have esbuild use a beta channel model for further development.
-
Fix preserving collapsed JSX whitespace (#3818)
When transformed, certain whitespace inside JSX elements is ignored completely if it collapses to an empty string. However, the whitespace should only be ignored if the JSX is being transformed, not if it's being preserved. This release fixes a bug where esbuild was previously incorrectly ignoring collapsed whitespace with --jsx=preserve
. Here is an example:
// Original code
<Foo>
<Bar />
</Foo>
// Old output (with --jsx=preserve)
<Foo><Bar /></Foo>;
// New output (with --jsx=preserve)
<Foo>
<Bar />
</Foo>;