Skip to content

mykola-vrmchk/esbuild-plugin-raw

 
 

Repository files navigation

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

About

esbuild plugin for raw import

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 80.5%
  • HTML 19.5%