https://github.com/hannoeru/esbuild-plugin-raw
esbuild plugin for raw import
https://github.com/hannoeru/esbuild-plugin-raw
esbuild raw tsup
Last synced: 7 months 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 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-22T19:17:44.000Z (12 months ago)
- Last Synced: 2025-03-14T21:12:45.032Z (7 months ago)
- Topics: esbuild, raw, tsup
- Language: TypeScript
- Homepage:
- Size: 1.11 MB
- Stars: 16
- Watchers: 1
- Forks: 3
- Open Issues: 3
-
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)