esbuild-plugin-raw
v0.1.8
Published
esbuild plugin for raw import
Downloads
4,878
Readme
esbuild-plugin-raw
Install
$ npm install -D esbuild-plugin-raw
Usage
With build script
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
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