https://github.com/sanyuan0704/esbuild-plugin-swc
Plugin for esbuild to support tranforming js(x)/ts(x) with swc.
https://github.com/sanyuan0704/esbuild-plugin-swc
Last synced: 6 months ago
JSON representation
Plugin for esbuild to support tranforming js(x)/ts(x) with swc.
- Host: GitHub
- URL: https://github.com/sanyuan0704/esbuild-plugin-swc
- Owner: sanyuan0704
- License: mit
- Created: 2021-11-17T02:51:13.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-17T11:03:04.000Z (almost 4 years ago)
- Last Synced: 2025-04-23T01:55:40.920Z (6 months ago)
- Language: TypeScript
- Size: 4.88 KB
- Stars: 13
- Watchers: 1
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# esbuild-plugin-swc
Plugin for esbuild to support tranforming js(x)/ts(x) with swc.
## Install
```js
// if using npm
npm i -D esbuild-plugin-swc
// if using yarn
yarn add -D esbuild-plugin-swc
// if using pnpm
pnpm i -D esbuild-plugin-swc
```## Usage example
```js
const esbuild = require('esbuild');
const { swcPlugin } = require('esbuild-plugin-swc');
esbuild.build({
entryPoints: ['./index.tsx'],
bundle: false,
outdir: 'out',
plugins: [
swcPlugin()
]
})
```## Options
When instantiating plugin you can pass an objects with options. This object has SWC official `Compilation` type, see detail in [Compilation](https://swc.rs/docs/configuration/compilation)。