Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on splitAtRoutes expectations? #973

Closed
NullVoxPopuli opened this issue Sep 20, 2021 · 2 comments
Closed

Clarification on splitAtRoutes expectations? #973

NullVoxPopuli opened this issue Sep 20, 2021 · 2 comments

Comments

@NullVoxPopuli
Copy link
Collaborator

NullVoxPopuli commented Sep 20, 2021

For cross-referencing: josemarluedke/docfy#111

Docfy generates routes at build time and instructs users to make their router include addDocfyRoutes:

example router.js
import EmberRouter from '@ember/routing/router';

import { addDocfyRoutes } from '@docfy/ember';
import config from 'ember-cheat-sheet/config/environment';

export default class Router extends EmberRouter {
  location = config.locationType;
  rootURL = config.rootURL;
}

Router.map(function () {
  addDocfyRoutes(this);
});

I had tried to configured splitAtRoutes here: https://github.com/NullVoxPopuli/ember-cheat-sheet/blob/main/ember-cli-build.js#L23

splitAtRoutes: ['docs', 'docs.templates'],

which is the "name" of the routes.
Confirmable here: https://cheatsheet.glimmer.nullvoxpopuli.com/docs (with the ember-inspector open)
image

Is my configuration correct? did I miss something in the splitAtRoutes docs?

Could this be related to: #972
(I did try ember s with that environment variable, and it made no difference)

here is what running with splitAtRoutes uncomment looks like:
image

@ef4
Copy link
Contributor

ef4 commented Sep 20, 2021

You need to switch to @embroider/router here:

https://github.com/NullVoxPopuli/ember-cheat-sheet/blob/f44bd9451621998156d8ab1ea0362bef577bbe1d/app/router.ts#L1

@ef4 ef4 closed this as completed Sep 20, 2021
@NullVoxPopuli
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants