esbuild-plugin-pnp

Yarn PnP plugin for esbuild 0.8.1 or higher

Usage no npm install needed!

<script type="module">
  import esbuildPluginPnp from 'https://cdn.skypack.dev/esbuild-plugin-pnp';
</script>

README

esbuild-plugin-pnp

Experimental support for using esbuild with yarn pnp. Tested with esbuild 0.8.1

Usage

const { build } = require("esbuild");
const pnpPlugin = require("esbuild-plugin-pnp");

build({
  entryPoints: ["index.ts"],
  bundle: true,
  outfile: "out.js",
  plugins: [pnpPlugin()],
}).catch(err => {
  console.log(err);
  process.exit(1);
});