Open ainsleyclark opened 1 month ago
This change poses a problem for plugins that are CLI tools for Payload.
Can you expand upon this?
If there is any occasion where a plugin may wish to import configuration externally to use as an executable, I'm not sure there's a way to do it?
For instance, the code snippet above is compiled using tsx, but now there's no way to obtain the Payload config.
Link to reproduction
https://github.com/ainsleydev/webkit/tree/main/packages/payload-helper
Environment Info
Payload: Beta 111 Node: v21.7.3
Describe the Bug
As of https://github.com/payloadcms/payload/releases/tag/v3.0.0-beta.79 I believe
importConfig
has been deprecated in favour of importing the file like so:import config from "./payload.config.js"
This change poses a problem for plugins that are CLI tools for Payload. I've tried various methods, including using require, but I'm still unable to import the config file via a plugin using a file path.
Reproduction Steps
Example script is here:
Adapters and Plugins
N/A