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

esbuild-plugin-babel

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-babel

Babel plugin for esbuild.

  • 0.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
decreased by-14.83%
Maintainers
1
Weekly downloads
 
Created
Source

esbuild-plugin-babel

Babel plugin for esbuild.


First, check if esbuild supports the transform you need (it's faster).
If not, you can add the Babel plugin you need with this plugin.


Install

npm install esbuild-plugin-babel --save-dev

Use

esbuild.config.js

import esbuild from 'esbuild';
import babel from 'esbuild-plugin-babel';

esbuild
    .build({
        entryPoints: ['index.js'],
        bundle: true,
        outfile: 'main.js',
        plugins: [babel()]
    })
    .catch(() => process.exit(1));

package.json

{
    "type": "module",
    "scripts": {
        "start": "node esbuild.config.js"
    }
}

Configure

esbuild.config.js

babel({
    filter: /.*/,
    namespace: '',
    config: {} // babel config here or in babel.config.json
});

babel.config.json

{
    "sourceMaps": "inline",
    "presets": [...],
    "plugins": [...]
}

Check

esbuild-plugin-pipe   →   Pipe esbuild plugins output.

esbuild-plugin-postcss-literal   →   PostCSS tagged template literals plugin for esbuild.


Keywords

FAQs

Package last updated on 26 Jan 2021

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