xcaddy icon indicating copy to clipboard operation
xcaddy copied to clipboard

Building plugin with other plugins

Open AndreKR opened this issue 11 months ago • 2 comments

Sorry to create an issue because this is more of a usage question but it's really not obvious so one could say this is a request for improved documentation. :)

When I use xcaddy from the plugin directory to build Caddy with my plugin, how do I include other plugins at the same time? I tried xcaddy --with github.com/mholt/caddy-events-exec run but that just says Error: unknown flag: --with.

AndreKR avatar Feb 11 '25 23:02 AndreKR

I'm not sure that's possible right now, but it would make sense to include.

But what you can do instead is use xcaddy build and do module replacement with the = syntax, then run that binary. Two commands instead of one, but it's more flexible.

francislavoie avatar Feb 12 '25 06:02 francislavoie

Yeah, I use build and then with to include both plugins: the current one (using =. To replace it with the local copy) and the other one.

mholt avatar Feb 12 '25 13:02 mholt