Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hannoeru/esbuild-plugin-raw
esbuild plugin for raw import
https://github.com/hannoeru/esbuild-plugin-raw
esbuild raw tsup
Last synced: 11 days ago
JSON representation
esbuild plugin for raw import
- Host: GitHub
- URL: https://github.com/hannoeru/esbuild-plugin-raw
- Owner: hannoeru
- License: mit
- Created: 2021-05-27T08:05:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-16T12:37:18.000Z (7 months ago)
- Last Synced: 2024-04-17T04:34:26.448Z (7 months ago)
- Topics: esbuild, raw, tsup
- Language: TypeScript
- Homepage:
- Size: 1.02 MB
- Stars: 14
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)