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.1.1 to 0.1.2

2

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

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

@@ -7,2 +7,7 @@ # esbuild-plugin-babel

First, check if [esbuild supports](https://esbuild.github.io/content-types/) the transform you need _(it's faster)_.
If not, you can add the Babel plugin you need with this plugin.
<br>
### Install

@@ -53,6 +58,6 @@

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

@@ -64,14 +69,15 @@

{
"presets": [["@babel/preset-env", { "modules": false }]],
"plugins": ["@babel/plugin"],
"sourceMaps": "inline"
"presets": [...],
"plugins": [...]
}
```
[`.browserslistrc`](https://github.com/browserslist/browserslist)
<br>
```yaml
defaults
```
### Check
[esbuild-plugin-pipe](https://github.com/nativew/esbuild-plugin-pipe) &nbsp; → &nbsp; Pipe esbuild plugins output.
[esbuild-plugin-postcss-literal](https://github.com/nativew/esbuild-plugin-postcss-literal) &nbsp; → &nbsp; PostCSS tagged template literals plugin for esbuild.
<br>

@@ -11,11 +11,11 @@ import babel from '@babel/core';

const transformContents = ({ args, contents }) => {
options = babel.loadOptions(config);
const babelOptions = babel.loadOptions(config);
if (options.sourceMaps) {
if (babelOptions.sourceMaps) {
const filename = path.relative(process.cwd(), args.path);
options.sourceFileName = filename;
babelOptions.sourceFileName = filename;
}
babel.transform(contents, options, (error, result) => {
babel.transform(contents, babelOptions, (error, result) => {
if (error) throw error;

@@ -22,0 +22,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