Basically we want to remove these lines: https://github.com/seamapi/nextjs-server-modules/blob/6f3ce3b7397a90a1a59e009d66cf5c6731e8f1d9/lib/build.js#L32 Possibly helpful module for bundling routes: https://github.com/seveibar/make-vfs