antfu-collective/vite-plugin-inspect — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a Vite plugin that lets developers inspect what happens to files as they pass through other Vite plugins. I want it to be useful when debugging a Vite app or when writing a plugin, so it should show the intermediate transformed code for modules and make it easy to see which plugin changed what.

It should plug into a normal Vite config with a simple Inspect call, and it should work through Vite DevTools during development. Also support a build mode where, after running the production build, it outputs a small inspector app into a folder like .vite-inspect that can be served locally to review the build transforms.

Please keep the setup simple, TypeScript based, and include a small playground or example Vite project so I can test it quickly. Add basic tests where they make sense, and make sure the README explains installation, config for dev mode, and config for build mode.

Want more depth? Deep Reverse