Closed rafalnawojczyk closed 1 year ago
Hey @rafalnawojczyk I just pushed a fix for this, thanks for bringing it to our attention. If you install the latest @payloadcms/next-payload
version the console warning will disappear.
The issue still persists on 0.1.9.
https://github.com/payloadcms/next-payload/blob/main/withPayloadPlugin.js#L9
fs
is not defined so it throws a ReferenceError
.
This fixes it https://github.com/payloadcms/next-payload/pull/90
Link to reproduction
No response
Describe the Bug
When building an app or even trying to start a development server, there is one annoying console.log that looks like that:
It keeps informing me, that I need to specify custom CSS in next.config.js file, and is issued specifically by "withPayload".
Funny part is that when I'm updating a 'cssPath' property in next.config.js file - it is treated as a string. Whatever I put in there - even functions - it is printed exactly the same in console.
When I'm putting a path to CSS file - it is simply telling me that Custom css file not found at "my path to css file".
When rolling back from payload 2.0. to 1.14 - it disappears.
To Reproduce
Simply run
npm run dev
in Next.js + PayloadCMS project.Payload Version
2.0.12
Adapters and Plugins
bundler-webpack, db-mongodb, s3Adapter, cloudstorage, seo, redirects,