Remix SPA mode can't resolve server.js


I’m trying to deploy a Remix v2 app in SPA mode but I keep getting an error where the built server file can’t be resolved when referenced from the netlify function.

This can be easily reproduced with the netlify/remix-template repo if you pass { ssr: false } to the remix vite plugin config.
Public repo: GitHub - alexo382/remix-netlify-spa
Deploy logs: Netlify App

Can you please help me figure this out? Thanks a lot!

Since you’re using SPA, I believe you can remove the Netlify Plugin and all Netlify dependencies.