Next.js Discord

Discord Forum

How do I make a sure a file gets included in the app?

Unanswered
Giant wood wasp posted this in #help-forum
Open in Discord
Giant wood waspOP
I have a model.bin file I'm trying to dynamically load on the server with fs, but it's not even getting included in the app?

3 Replies

in my example it is a text file, if it is a binary then the type of data might be something else, or you might have to use something other than asset/source, see here https://webpack.js.org/guides/asset-modules/
Giant wood waspOP
great thanks 🙏 i'll try this and report back