Backbone.js - TypeError: router.createEdgeConfig is not a function

Issue when deploying a new BackboneJS app to XDN
> Bundling routes.js and xdn.config.js… done.
TypeError: router.createEdgeConfig is not a function
at DeploymentBuilder. (/Users/ankur.kumar/Desktop/backbone-app/app/node_modules/@xdn/core/deploy/DeploymentBuilder.js:432:53)
at step (/Users/ankur.kumar/Desktop/backbone-app/app/node_modules/@xdn/core/deploy/DeploymentBuilder.js:45:23)
at Object.next (/Users/ankur.kumar/Desktop/backbone-app/app/node_modules/@xdn/core/deploy/DeploymentBuilder.js:26:53)
at fulfilled (/Users/ankur.kumar/Desktop/backbone-app/app/node_modules/@xdn/core/deploy/DeploymentBuilder.js:17:58)

Hmm… Is your routes.js file is exporting an instance of Router?

Was able to resolve this by adding the following to the routes.js file

// routes.js
const { Router } = require('@xdn/core/router');

module.exports = new Router()