esbuild-plugin-modify-entrypoints

0.2.0 • Public • Published

esbuild-plugin-modify-entrypoints

Build Status

Install

npm install esbuild-plugin-modify-entrypoints -D

Usage

Add the plugin to your esbuild plugins.

import { build } from 'esbuild';

import { modifyEntrypointsPlugin } from 'esbuild-plugin-modify-entrypoints';

const results = await build({
  entryPoints: ['your-file.ts'],
  plugins: [
    modifyEntrypointsPlugin(({ contents }) => {
      return {
        contents: `console.log('First');\n${contents}`,
        loader: 'ts',
      };
    }),
  ],
});

Dependents (0)

Package Sidebar

Install

npm i esbuild-plugin-modify-entrypoints

Weekly Downloads

36

Version

0.2.0

License

MIT

Unpacked Size

8.19 kB

Total Files

8

Last publish

Collaborators

  • webdeveric