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

Re-exporting co-location components from nested folder #330

Closed
mydea opened this issue Oct 14, 2019 · 5 comments
Closed

Re-exporting co-location components from nested folder #330

mydea opened this issue Oct 14, 2019 · 5 comments

Comments

@mydea
Copy link

mydea commented Oct 14, 2019

Co-location in nested folders is generally working fine for me, except for one case:

I just tried moving an (internal) addon to use co-location, and it does not work if I have a folder structure like this (omitting all .js files for the components, for simplicity)

  • addon
    • components
      • my-component
        • sub-a.hbs
        • sub-b.hbs
      • my-component.hbs
  • app
    • components
      • my-component
        • sub-a.js
        • sub-b.js
      • my-component.js

Where the app/components/my-component.js re-export looks like this:

export {
  default
} from 'my-addon/components/my-component';

It will not find this component in the app.
It works if I move that file to app/components/my-component/index.js instead.

(Superseding my comment in emberjs/ember.js#18255)

This is with [email protected] & [email protected].

Copy link
Member

rwjblue commented Oct 14, 2019

Thank you for opening this!

@rwjblue
Copy link
Member

rwjblue commented Oct 17, 2019

@mydea - I can't reproduce this 🤔.

I created a branch over here with the same setup that you described above, and all three components can be rendered. Can you take a look at that repro and see if I've done something wrong, or possible send me a PR that replicates the issue you hit?

@rwjblue
Copy link
Member

rwjblue commented Oct 17, 2019

Is it possible that you were hitting issues from #333? I don't recall if you mentioned you were using TypeScript or no...

@rwjblue
Copy link
Member

rwjblue commented Oct 21, 2019

@mydea - Any help identifying whats going on would be useful.

@mydea
Copy link
Author

mydea commented Oct 22, 2019

OK, I went back to try it again and it works just fine now for me as well - not sure what exactly was wrong there. Maybe I didn't update something properly, or I just had a typo... Sorry for the confusion!

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