Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@next/swc-darwin-arm64

Package Overview
Dependencies
Maintainers
7
Versions
1657
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`

  • 11.1.3-canary.17
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2M
decreased by-33.12%
Maintainers
7
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 15 Sep 2021

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