1. @swc/register
Super fast alternative for babel-register
@swc/register
Package: @swc/register
Created by: swc-project
Last modified: Thu, 08 Feb 2024 06:05:37 GMT
Version: 0.1.10
License: (Apache-2.0 OR MIT)
Downloads: 392,978
Repository: https://github.com/swc-project/register

Install

npm install @swc/register
yarn add @swc/register

@swc/register

One of the ways you can use swc is through the require hook. The require hook
will bind itself to node's require and automatically compile files on the fly.

Install

 npm i -D @swc/core @swc/register

or

 yarn add --dev @swc/core @swc/register

Usage

 require("@swc/register");

All subsequent files required by node will be transformed by swc. You can also
call @swc/register directly from command line.

 swc-node <filename>
node -r '@swc/register' <filename>

 


@swc/register is primarily distributed under the terms of both the MIT
license
and the Apache License (Version 2.0). See COPYRIGHT for details.

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code