Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

[Nextjs, app router, webpack] importing and using payload.find to fetch data crashes things

default discord avatar
sawariz0r2 years ago
1

Back with my webpack struggles!



So I've based my next site off

https://github.com/payloadcms/nextjs-custom-server

, converted it to use the app router and now I'm running into a few issues when importing and using payload to fetch data.



Just a quick 👋 to see if someone has run into this before 🙂



I'm running the next/payload app on the image

node:18-alpine

.

  • discord user avatar
    dribbens
    2 years ago

    I'm not an expert on bundlers but it seems like this shouldn't be happening:


    webpack either needs to exclude this kind of file or node_modules entirely and I don't know the answer.



    I bet

    @281120856527077378

    would know the answer.

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.