Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hannoeru/esbuild-plugin-raw

esbuild plugin for raw import
https://github.com/hannoeru/esbuild-plugin-raw

esbuild raw tsup

Last synced: 14 days ago
JSON representation

esbuild plugin for raw import

Awesome Lists containing this project

README

        

# esbuild-plugin-raw

## Install

```sh
$ npm install -D esbuild-plugin-raw
```

## Usage

### With build script

```js
import esbuild from 'esbuild'
import RawPlugin from 'esbuild-plugin-raw'

esbuild.build({
entryPoints: ['app.js'],
bundle: true,
outfile: 'out.js',
plugins: [RawPlugin],
}).catch(() => process.exit(1))
```

### With [tsup](https://github.com/egoist/tsup)

```js
import { defineConfig } from 'tsup'
import RawPlugin from 'esbuild-plugin-raw'

export default defineConfig({
entryPoints: ['index.ts'],
format: ['cjs', 'esm'],
dts: true,
esbuildPlugins: [RawPlugin()],
clean: true,
})
```

## License

MIT License © 2021 [hannoeru](https://github.com/hannoeru)