embroider: Colocated components within folders do not render
I’m trying out Embroider "0.44.2" with an App with colocated components. So we have them as:
app
- components
- componentA
- template.hbs
- component.js
- componentB
- template.hbs
- component.js
componentA and componentB do not render at all nor throw any error. But if I change the structure to:
app
- components
- componentA.hbs
- componentA.js
- componentB.hbs
- componentB.js
That “fixes” it. I don’t want to migrate them all as we have a ton, plus, having them encapsulated in a single folder per name is more manageable.
I already tried disabling staticComponents. But no look… am I missing something?
Thank you 🙏
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (7 by maintainers)
Thanks for the pointer @lifeart, I have submitted a possible fix to support pods components when
podModulePrefix === ''.As two of you mentionned, it might be the good opportunity for our team to move from a pods-based component structure to the colocated. There is a codemod to migrate to the colocated components and it could modified to support the pods components. But it would mean migrating many components in multiple applications shared between many developpers… We will probably end up migrating to colocated components. But if we ran into the issue, it might be a blocker for other teams? Also, this layout is still documented in ember-cli official documentation. This is my reasoning to submit the fix 😃
Nice catch @lifeart! But unfortunately it doesn’t seem to fix the issue (the tests are still failing).
@dcyriller try to specify podModulePrefix to “” (https://github.com/embroider-build/embroider/pull/930)