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
Engines breakpoint templates must be in app/ #102
Comments
As far as I can tell (from the description and conversations in slack) this is actually not directly related to ember-engines at all (though it is indirectly related). The more fundamental issue is that ember-cli currently does not call The good news is that I submitted a PR a while back to ember-cli that fixes this exact issue, and @nathanhammond is helping to land it (fleshing out more tests in the space and whatnot). The related PR is ember-cli/ember-cli#6516. |
It seems the PR @rwjblue mentioned has been merged. Does this fix the issue @dustinfarris? |
I believe the other thing is that you have to move the layout compiler into dependencies instead of dev-dependencies for the engines. |
@dustinfarris can you try this out and do as @runspired suggested please? |
Going to close this, due to lack of response from @dustinfarris. If it's still an issue, feel free to reach back out! |
Confirmed, moving flexi-layouts into No need for service injection inside the engine either, it just works as expected, picks up all the various |
Summary
layouts in
/my-engine/addon/templates/**/-layouts/*
are not compiled.Details
ember-engines encourages you to put everything in
addon/
and doesn't even create anapp/
folder in the blueprint. This includes templates. ember-engines automagically re-exports everything it needs so that it is available at runtime.Flexi compiles breakpoint templates (e.g.
-layouts/mobile.hbs
) inpreprocessTree
, where it is handed all the known templates at that time. Flexi extracts and compiles the stuff in -layouts folders, and then merges it back in with the rest.The problem seems to be that ember-engines has not re-exported the templates yet at this stage in preprocessTree, rather it does not happen until Engines starts piecing things together in some very sophisticated treeFor* callbacks. So, if you have a breakpoint template in
my-engine/addon/templates/index/-layouts/mobile.hbs
, it will be merged into a big 'ol app tree eventually (not sure how lazy-loading plays in here), but not in time for flexi.https://github.com/ember-engines/ember-engines#addontemplates
The text was updated successfully, but these errors were encountered: