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

rollup-plugin-esbuild

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-esbuild

**💛 You can help the author become a full-time open-source maintainer by [sponsoring him on GitHub](https://github.com/sponsors/egoist).**

  • 5.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
131K
decreased by-41.12%
Maintainers
1
Weekly downloads
 
Created

What is rollup-plugin-esbuild?

The rollup-plugin-esbuild package is a Rollup plugin that integrates esbuild, a fast JavaScript bundler and minifier, into the Rollup build process. It allows you to transpile TypeScript, JSX, and modern JavaScript syntax to older versions of JavaScript, as well as minify the output.

What are rollup-plugin-esbuild's main functionalities?

Transpile TypeScript

This feature allows you to transpile TypeScript files to JavaScript. The code sample demonstrates how to configure rollup-plugin-esbuild to process .ts files and output a CommonJS bundle.

const esbuild = require('rollup-plugin-esbuild');

module.exports = {
  input: 'src/index.ts',
  output: {
    file: 'dist/bundle.js',
    format: 'cjs'
  },
  plugins: [
    esbuild({
      include: /\.ts$/,
      minify: false,
      target: 'es2015'
    })
  ]
};

Transpile JSX

This feature allows you to transpile JSX files to JavaScript. The code sample demonstrates how to configure rollup-plugin-esbuild to process .jsx files and output an ES module bundle.

const esbuild = require('rollup-plugin-esbuild');

module.exports = {
  input: 'src/index.jsx',
  output: {
    file: 'dist/bundle.js',
    format: 'esm'
  },
  plugins: [
    esbuild({
      include: /\.jsx$/,
      minify: false,
      target: 'es2015'
    })
  ]
};

Minify JavaScript

This feature allows you to minify JavaScript files. The code sample demonstrates how to configure rollup-plugin-esbuild to minify the output and target ES2015.

const esbuild = require('rollup-plugin-esbuild');

module.exports = {
  input: 'src/index.js',
  output: {
    file: 'dist/bundle.min.js',
    format: 'iife'
  },
  plugins: [
    esbuild({
      minify: true,
      target: 'es2015'
    })
  ]
};

Other packages similar to rollup-plugin-esbuild

FAQs

Package last updated on 08 Nov 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