Find payload.config.cjs automatically #2875
NEO97online
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Since payload is currently on commonjs still, it's harder to use in projects that use ESM.
If I have
module: truein mypackage.json, I won't be able to use.jsas the file extension for my payload config, I'll have to use.cjs. Unfortunately, payload doesn't look forpayload.config.cjs, so I then have to specify thePAYLOAD_CONFIG_PATHenvironment variable for every payload command.Instead, payload should also search for
payload.config.cjsinstead of only*.jsand*.ts.Beta Was this translation helpful? Give feedback.
All reactions