Next.js Discord

Discord Forum

Hosting game assets

Unanswered
N_tonio36 posted this in #help-forum
Open in Discord
Hey there. I'm currently developing a game using the Phaser 3 framework. Ideally, I would create the game in its own package, then import that package and integrate the game into a webapp. The framework's asset loading method uses / as its default loading directory.
But I'm encoutering a problem, where I need to host the game's assets in my next app while keeping them inside the game's package and outside the web app source code. I've read the docs on how to update the Next webpack config (as per https://nextjs.org/docs/pages/api-reference/next-config-js/webpack this post) which seems to do the trick, but I wanted to ask if there's a better way to achieve my goal.

Thanks in advance.

0 Replies