Product
New Socket Web Extension, Take Socket with You
Can you spot malicious malicious packages on the web at a glance? Socket can. Check out our updated Web Extension!
@swc/core-win32-arm64-msvc
Advanced tools
Package description
@swc/core-win32-arm64-msvc is a high-performance JavaScript/TypeScript compiler written in Rust. It is designed to be a drop-in replacement for Babel, offering faster compilation times and lower memory usage. This specific package is tailored for Windows on ARM64 architecture with the MSVC toolchain.
JavaScript/TypeScript Compilation
This feature allows you to compile JavaScript or TypeScript code to a specified ECMAScript version. The example demonstrates transforming modern JavaScript code to ES5.
const swc = require('@swc/core');
const inputCode = `const greet = (name) => { return `Hello, ${name}!`; };`;
swc.transform(inputCode, { jsc: { target: 'es5' } }).then(output => {
console.log(output.code);
});
Minification
This feature enables code minification, reducing the size of the output JavaScript file. The example shows how to minify a simple addition function.
const swc = require('@swc/core');
const inputCode = `function add(a, b) { return a + b; }`;
swc.transform(inputCode, { minify: true }).then(output => {
console.log(output.code);
});
Source Maps
This feature generates source maps, which are useful for debugging by mapping the transformed code back to the original source. The example demonstrates generating a source map for a simple function.
const swc = require('@swc/core');
const inputCode = `const greet = (name) => { return `Hello, ${name}!`; };`;
swc.transform(inputCode, { sourceMaps: true }).then(output => {
console.log(output.map);
});
Babel is a widely-used JavaScript compiler that allows you to use next-generation JavaScript, today. It has a rich plugin ecosystem and is highly configurable. Compared to @swc/core-win32-arm64-msvc, Babel is more mature and has broader community support, but it is generally slower in terms of compilation speed.
esbuild is an extremely fast JavaScript bundler and minifier. It is written in Go and offers blazing fast performance. While esbuild is faster than @swc/core-win32-arm64-msvc in many cases, it is less configurable and has fewer features related to code transformation.
Terser is a JavaScript parser, mangler, and compressor toolkit for ES6+. It is primarily used for minification. Compared to @swc/core-win32-arm64-msvc, Terser focuses solely on minification and does not offer the same breadth of features for code transformation.
Changelog
[1.6.12] - 2024-07-06
(es/decorators) Fix bugs of 2022-03
implementation (#9145) (8a3ae44)
(es/loader) Exclude .json
from default extension list (#9134) (e94e5e7)
(es/renamer) Fix renaming of default-exported declarations (#9135) (45f671d)
(es/typescript) Fix tricky cases in TS fast strip (#9159) (2bc51b8)
(es/typescript) Fix replacement logic of fast TS strip (#9163) (c5acafe)
(bindings/ts) Add transform/strip-only mode (#9138) (a08bb46)
(es/testing) Improve comment testing story (#9150) (3638e97)
Readme
@swc/core-win32-arm64-msvc
This is the aarch64-pc-windows-msvc binary for @swc/core
FAQs
Super-fast alternative for babel
The npm package @swc/core-win32-arm64-msvc receives a total of 1,351,945 weekly downloads. As such, @swc/core-win32-arm64-msvc popularity was classified as popular.
We found that @swc/core-win32-arm64-msvc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Can you spot malicious malicious packages on the web at a glance? Socket can. Check out our updated Web Extension!
Product
Socket introduces three new customizable default security policies for users to choose from: Low Noise (traditional SCA), Default, and Higher Noise.
Security News
MITRE has just minted its 400th CNA, as the NVD struggles to tame its backlog of CVEs awaiting analysis, which has increased by 30% since June.