webark / ember-component-css

An Ember CLI addon which allows you to specify styles for individual components
MIT License
540 stars 115 forks source link

styleNamespace empty string when using in both an app and addon #302

Open Skwai opened 6 years ago

Skwai commented 6 years ago

Currently get styleNamespace as a blank string for components when using ember-component-css in both an addon of ours and the main application

webark commented 6 years ago

@skwai this probably is a known issue.. :/ you could try the experimental tag, or the actively developed branch in #300

sunasra commented 5 years ago

@webark I am facing the same issue. Can you please let me know when do you have plan to fix this in normal release?

webark commented 5 years ago

@sunasra the plan is in place, but I am unable to set a firm timeline for when it will be in a stable release. I'm very sorry that this issue is around :( Through using peerDependecies, and version consistency, you are able to mitigate the issue, though that is a very less then ideal way to solve this issue. I'm sorry for the inconvenience.. :(

sunasra commented 5 years ago

@webark Thanks for your kind reply. I have tried installing experimental package but faced some minor issues. I am not sure how I can use peerDependecies with exact version. I read that peerDependecies does not automatically install with npm install command.

To unblock my team, for now I have build addon package without ember-component-css

ariesshrimp commented 5 years ago

this started happening to me today, i'm not sure i understand what to make of it...

this new component has no styleNamespace...

but this one does...

webark commented 5 years ago

@Skwai @joefraley please try this with the latest 0.6.9 version and see if that fixes your issue. All your addons and app should be to this version or higher.

akaravashkin commented 4 years ago

Have an addon (by ember-engines) with v0.7.4 and tagless component.

styleNamespace is empty string if I don't have component.js file like in @joefraley case.

If I create "empty" file component.js:

import Component from '@ember/component';
import layout from './template';

export default Component.extend({
  tagName: '',
  layout
});

styleNamespace starts to work.