Socket
Socket
Sign inDemoInstall

@next/swc-darwin-arm64

Package Overview
Dependencies
Maintainers
5
Versions
1557
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@next/swc-darwin-arm64

This is the **aarch64-apple-darwin** binary for `@next/swc`


Version published
Weekly downloads
1.9M
increased by6.71%
Maintainers
5
Weekly downloads
 
Created

What is @next/swc-darwin-arm64?

The @next/swc-darwin-arm64 package is a precompiled binary for the SWC (Speedy Web Compiler) specifically optimized for macOS on ARM64 architecture, such as the M1 chip. SWC is a super-fast compiler written in Rust that can be used to transpile TypeScript and JavaScript code, offering significant speed improvements over traditional JavaScript tooling. This package is part of the Next.js ecosystem and is designed to provide faster build times and improved development experience for Next.js projects running on macOS with ARM64 architecture.

What are @next/swc-darwin-arm64's main functionalities?

TypeScript and JavaScript Transpilation

This feature allows developers to transpile TypeScript and modern JavaScript to older versions for compatibility with a wider range of browsers. The code sample demonstrates how to transpile TypeScript code to ES2015 using the SWC compiler.

"use strict";\nconst swc = require('@next/swc-darwin-arm64');\n\nconst sourceCode = `const x: number = 10; console.log(x);`;\nconst options = {\n  jsc: {\n    parser: {\n      syntax: 'typescript',\n    },\n    target: 'es2015',\n  },\n};\n\nswc.transform(sourceCode, options).then((output) => {\n  console.log(output.code);\n});

Minification

This feature enables the minification of JavaScript code to reduce file size, which is crucial for improving load times on web pages. The code sample shows how to minify a simple JavaScript function.

"use strict";\nconst swc = require('@next/swc-darwin-arm64');\n\nconst sourceCode = `function add(a, b) {\n  return a + b;\n}`;\nconst options = {\n  minify: true,\n};\n\nswc.transform(sourceCode, options).then((output) => {\n  console.log(output.code);\n});

Other packages similar to @next/swc-darwin-arm64

FAQs

Package last updated on 04 Sep 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc