On the plugin "how-to" page I read that it is bes practice to add an enabled property to my plugin. I was curious on why? Wouldn't it be better to not include the plugin at all? Is this because of some future desire to enable/disable plugins from the admin UI? Or am I missing something?
For V2, the plugins needed to have webpack aliases for their server-side code. What many devs tried to do was conditionally including a plugin, but this would cause them to receive webpack errors because the code was being included and not aliased.
The enabled property convention was introduced so that even if the plugin was not being used, it's webpack aliases would still run, preventing errors.
Thanks, I'll immediatly move my checks up, so that the method will be escaped before the webpack code will run
Star
Discord
online
Get dedicated engineering support directly from the Payload team.