unjs / unplugin

Unified plugin system for Vite, Rollup, Webpack, esbuild, Rolldown, and more

Home Page:https://unplugin.unjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supporting `esbuild-plugin-pipe`

AndrewLeedham opened this issue Β· comments

Hi πŸ‘‹, I have been loving using unplugin mostly for vite and esbuild plugins in parallel.

One snag that took a while to get my head around is using multiple esbuild plugins to transform some code, this works in piped bundlers like rollup, vite etc. but from what I understand not in esbuild as it exposes onLoad internally which runs once per file, and unplugin uses that when using transform meaning any subsequent plugins won't do anything.

A potential solution seems to be esbuild-plugin-pipe which adds support for compatible plugins to pipe from one to another, passing along the output. Would support for this be considered as part of unplugin?