esbuild-plugin-babel
Advanced tools
Comparing version 0.0.0 to 0.1.0
{ | ||
"name": "esbuild-plugin-babel", | ||
"version": "0.0.0", | ||
"version": "0.1.0", | ||
"description": "Babel plugin for esbuild.", | ||
@@ -8,6 +8,7 @@ "repository": "nativew/esbuild-plugin-babel", | ||
"license": "ISC", | ||
"exports": "index.js", | ||
"main": "index.js", | ||
"exports": "src/index.js", | ||
"main": "src/index.js", | ||
"type": "module", | ||
"scripts": { | ||
"format": "prettier --write '*'" | ||
"format": "prettier --write '**/*'" | ||
}, | ||
@@ -22,4 +23,9 @@ "peerDependencies": { | ||
"files": [ | ||
"index.js" | ||
"src" | ||
], | ||
"keywords": [ | ||
"babel", | ||
"esbuild", | ||
"esbuild-plugin" | ||
] | ||
} |
# esbuild-plugin-babel | ||
🚧 **`readme` coming soon.** | ||
[Babel](https://github.com/babel/babel) plugin for [esbuild](https://github.com/evanw/esbuild). | ||
### Config | ||
<br> | ||
Create a [`babel.config.json`](https://babeljs.io/docs/en/configuration) file at the root of your project. | ||
### Install | ||
```zsh | ||
npm install esbuild-plugin-babel --save-dev | ||
``` | ||
<br> | ||
### Use | ||
`esbuild.config.js` | ||
```js | ||
import esbuild from 'esbuild'; | ||
import pluginBabel from 'esbuild-plugin-babel'; | ||
esbuild | ||
.build({ | ||
entryPoints: ['index.js'], | ||
bundle: true, | ||
outfile: 'main.js', | ||
plugins: [pluginBabel()] | ||
}) | ||
.catch(() => process.exit(1)); | ||
``` | ||
`package.json` | ||
```json | ||
{ | ||
"presets": [...], | ||
"type": "module", | ||
"scripts": { | ||
"start": "node esbuild.config.js" | ||
} | ||
} | ||
``` | ||
<br> | ||
### Configure | ||
`esbuild.config.js` | ||
```js | ||
pluginBabel({ | ||
filter = /.*/, | ||
namespace = '', | ||
config = {} // babel config here or in babel.config.json | ||
}) | ||
``` | ||
[`babel.config.json`](https://babeljs.io/docs/en/configuration) | ||
```json | ||
{ | ||
"presets": [["@babel/preset-env", { "modules": false }]], | ||
"plugins": [...], | ||
@@ -16,1 +67,9 @@ "sourceMaps": "inline" | ||
``` | ||
[`.browserslistrc`](https://github.com/browserslist/browserslist) | ||
```yaml | ||
defaults | ||
``` | ||
<br> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3330
27
75
Yes