Webpack warnings of export was not found.

default discord avatar
fabcodingzest
2 years ago
1 1

Hey,

I was working with Payload and next.js boilerplate to build an e-commerce site(a practice project). I tried to customize the upload to use cloudinary using this approach, but I am getting the following warnings from Webpack.

image

This was working perfectly fine when I experimented with an app created with create-payload-app, is it something with the next.js custom server? I have used an alias for files having server-side only packages in webpack config as directed by docs, not sure what is the reason but I couldn't find any solution.

Here is the link to my repo I am working with.

  • default discord avatar
    fabcodingzest
    2 years ago

    Um Alright, I figured it out. I had to use export default {} in emptyObject.ts and export all hooks as default from CloudinaryMediaHooks. That solved the problem for me.

Open the post
Continue the discussion in GitHub
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.