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: true
in mypackage.json
, I won't be able to use.js
as 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_PATH
environment variable for every payload command.Instead, payload should also search for
payload.config.cjs
instead of only*.js
and*.ts
.Beta Was this translation helpful? Give feedback.
All reactions