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

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Enhancing Vue.js Development: Harnessing the Potential of Vue-Loader

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Simplify Data Validation in Vue.js: A Step-by-Step Guide to Using Regex

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Troubleshooting Made Easy: Common Issues and Solutions with vue-loader Without vue-cli

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Optimizing Webpack 4 with Vue CLI 3: Disabling the Cache-Loader

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin

Step-by-Step Guide: How to Add a Function to Your Vuex Plugin