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

esbuild-runner

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-runner

Super-fast on-the-fly transpilation of modern JS, TypeScript and JSX using esbuild

  • 2.2.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
127K
increased by12.8%
Maintainers
1
Weekly downloads
 
Created

What is esbuild-runner?

The esbuild-runner npm package is a tool that allows you to run JavaScript and TypeScript files using esbuild, a fast JavaScript bundler and minifier. It is designed to be a lightweight and efficient alternative to other build tools, providing quick startup times and minimal configuration.

What are esbuild-runner's main functionalities?

Running JavaScript files

This feature allows you to run JavaScript files directly using esbuild. The `register` function sets up the environment, and then you can require and run your JavaScript file.

const { register } = require('esbuild-runner');
register();
require('./your-script.js');

Running TypeScript files

This feature allows you to run TypeScript files directly using esbuild. Similar to running JavaScript files, the `register` function sets up the environment, and then you can require and run your TypeScript file.

const { register } = require('esbuild-runner');
register();
require('./your-script.ts');

Custom esbuild options

This feature allows you to customize esbuild options when running your scripts. You can specify options like the target environment, JSX factory, and JSX fragment.

const { register } = require('esbuild-runner');
register({
  target: 'es2017',
  jsxFactory: 'h',
  jsxFragment: 'Fragment'
});
require('./your-script.tsx');

Other packages similar to esbuild-runner

Keywords

FAQs

Package last updated on 14 Oct 2022

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