New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

package.json
{
"name": "esbuild-plugin-babel",
"version": "0.2.1",
"version": "0.2.2",
"description": "Babel plugin for esbuild.",

@@ -5,0 +5,0 @@ "repository": "nativew/esbuild-plugin-babel",

@@ -7,7 +7,14 @@ import babel from '@babel/core';

name: 'babel',
async setup(build, { transform } = {}) {
setup(build, { transform } = {}) {
const { filter = /.*/, namespace = '', config = {} } = options;
const transformContents = ({ args, contents }) => {
const babelOptions = babel.loadOptions({ filename: args.path, ...config });
const babelOptions = babel.loadOptions({
...config,
filename: args.path,
caller: {
name: 'esbuild-plugin-babel',
supportsStaticESM: true
}
});

@@ -27,3 +34,3 @@ if (babelOptions.sourceMaps) {

if (transform) return await transformContents(transform);
if (transform) return transformContents(transform);

@@ -33,3 +40,3 @@ build.onLoad({ filter, namespace }, async args => {

return await transformContents({ args, contents });
return transformContents({ args, contents });
});

@@ -36,0 +43,0 @@ }

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