Abstracting routes away

Can I put these this.route calls into a different file?

well, you can:

import myCustomerRouter from './my-customer-router';

...

Router.map(function() {
  myCustomerRouter.apply(this);
});

and then inside my-custom-router.js:

export default function() {
  this.route('foo');
};

Another approach:

I have a quite similar use-case, and what I’m doing is to use different branches. Next I merge master to the customer branches whenever I wish updates. For stlyes and customer extensions this works great. And for configuration I just use the config/environment.js file.

1 Like