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

Nested Pod Styles #10

Closed
timkendall opened this issue Mar 9, 2016 · 3 comments
Closed

Nested Pod Styles #10

timkendall opened this issue Mar 9, 2016 · 3 comments

Comments

@timkendall
Copy link
Contributor

I'm not sure that this supports nested pod components. For example, given the structure

/components
  /infinite-list
    -component.js
    -template.hbs
    -styles.css
    /list-item
      styles.css
      ...

I will receive the error Uncaught Error: Failed to create an instance of 'styles:infinite-list/list-item'. Most likely an improperly defined class or an invalid module export. Am I doing something wrong?

@dfreeman
Copy link
Member

We're using nested components with this addon in production, and I just added a couple tests (which I actually thought already existed) to make sure those continue to work moving forward.

Based on that error, it looks as though the ember-css-modules initializer hasn't run. Can you provide any more details about your setup?

@timkendall
Copy link
Contributor Author

So as mentioned in #11, my Ember Engines setup was likely what was causing issues. Everything seems to work now after restarting Ember server. Thanks for adding the tests. We can probably close this issue!

@dfreeman
Copy link
Member

Incidentally, the normalized project structure proposed in emberjs/rfcs#124 would eliminate the need to manually import styles (and template) in addons – it'll be great to be able to get rid of that particular gotcha.

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