Socket
Socket
Sign inDemoInstall

esbuild-register

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-register

Transpile JSX, TypeScript and esnext features on the fly with esbuild


Version published
Weekly downloads
5.1M
increased by3.83%
Maintainers
1
Weekly downloads
 
Created

What is esbuild-register?

The esbuild-register package allows you to transpile your code on the fly using esbuild. This is particularly useful for running TypeScript or modern JavaScript that uses JSX or other newer syntax without a separate build step. It hooks into Node.js's require in order to automatically compile files on-the-fly when they are required.

What are esbuild-register's main functionalities?

Transpile TypeScript on the fly

This feature allows you to automatically transpile TypeScript files when they are required in Node.js. This is particularly useful for development environments, where you want to avoid a separate build step for TypeScript.

require('esbuild-register/dist/node').register({
  loader: 'tsx'
});

require('./your-ts-file.ts');

Transpile modern JavaScript (ES6+) on the fly

With this feature, you can automatically transpile modern JavaScript files that use ES6+ features or JSX. This is useful for running modern JavaScript directly in Node.js without pre-compilation.

require('esbuild-register').register({
  loader: 'jsx'
});

require('./your-modern-js-file.js');

Other packages similar to esbuild-register

FAQs

Package last updated on 25 Jul 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