Socket
Socket
Sign inDemoInstall

@swc/core-linux-x64-musl

Package Overview
Dependencies
0
Maintainers
2
Versions
431
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @swc/core-linux-x64-musl

Super-fast alternative for babel


Version published
Weekly downloads
5.1M
increased by0.16%
Maintainers
2
Created
Weekly downloads
 

Package description

What is @swc/core-linux-x64-musl?

The @swc/core-linux-x64-musl package is a precompiled version of SWC (Speedy Web Compiler) specifically for Linux x64 systems using the musl libc. SWC is a super-fast compiler written in Rust that allows for transforming ECMAScript 2015+ code into a backward-compatible version of JavaScript that can be run in older browsers. It's also capable of handling JSX, TypeScript, and producing source maps.

What are @swc/core-linux-x64-musl's main functionalities?

JavaScript/TypeScript Compilation

This feature allows for the compilation of modern JavaScript or TypeScript code into a version compatible with older browsers. The code sample demonstrates how to synchronously compile a simple ES6 const declaration into ES5.

require('@swc/core-linux-x64-musl').transformSync('const x = 1;', { jsc: { target: 'es5' } });

JSX Transformation

This feature enables the transformation of JSX syntax into JavaScript, making it possible to use React or similar libraries. The code sample shows how to transform a simple JSX element into JavaScript.

require('@swc/core-linux-x64-musl').transformSync('<div>Hello, world!</div>', { jsc: { parser: { syntax: 'typescript', tsx: true }, target: 'es5' }, filename: 'file.tsx' });

Source Map Generation

This feature generates source maps for the transformed code, facilitating debugging by mapping the transformed code back to the original source code. The code sample demonstrates generating a source map for a simple piece of code.

require('@swc/core-linux-x64-musl').transformSync('const x = 1;', { sourceMaps: true });

Other packages similar to @swc/core-linux-x64-musl

Changelog

Source

[1.5.0] - 2024-04-24

Bug Fixes

  • (es/minifier) Abort seq inline on recursive usage (#8887) (cd4548f)

Features

Readme

Source

@swc/core-linux-x64-musl

This is the x86_64-unknown-linux-musl binary for @swc/core

Keywords

FAQs

Last updated on 24 Apr 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc