cloudflare / workers-sdk

⛅️ Home to Wrangler, the CLI for Cloudflare Workers®
https://developers.cloudflare.com/workers/
Apache License 2.0
2.73k stars 724 forks source link

🛠️ CHORE: Better organise esbuild plugins #6208

Open CarmenPopoviciu opened 4 months ago

CarmenPopoviciu commented 4 months ago

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

3.63.1

What version of Node are you using?

18.20.0

What operating system and version are you using?

MacOS Sonoma 14.4.1

Describe the Bug

wrangler uses a bunch of esbuild plugins for bundling & building both Workers proper and Workers for Pages projects. These plugins are spread all over the place, and tend to lack descriptions abt what it is that they do. Furthermore, these plugins tend to be added cumulatively by different internal APIs, at different points in time in the API invocation chain. This makes them

It would be great if we could better organise these plugins in our codebase, in order to gain more insight into what is actually "out there" 🌌, what is used where and for what, and just do some spring cleaning overall :meouw-wow:

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

emily-shen commented 1 month ago

@CarmenPopoviciu having a look now these seem to all be in either /deployment-bundle/esbuild-plugins, plus one in pages/functions/buildWorker.ts

Has this been dealt with already, have i missed a bunch of plugins or did you have some other organisation in mind?