Closed SergeAstapov closed 2 years ago
@SergeAstapov I can merge this. Just curious as to what your usage is without the initializer.
@webark we've migrated almost all components to Glimmer and use helper similar to https://github.com/webark/ember-cli-styles/blob/main/packages/namespace/addon/helpers/style-namespace.js but much simpler:
import { helper } from '@ember/component/helper';
import podNames from 'ember-component-css/pod-names';
export default helper(function styleNamespace ([componentName]) {
return podNames[componentName];
});
which was inspired by this comment https://github.com/ebryn/ember-component-css/issues/342#issuecomment-570722703 (or maybe another one but with the same idea behind)
@webark moving forward we'll definitely migrate to ember-cli-styles
or ember-css-modules
but having such fix proposed here allows to decouple that effort from Ember v4 upgrade.
ahh. Ok cool. Yea, ember-cli-styles uses the same kind of helper, just adds the namespace during build through an ast rather than needing to look it up through a dynamically generated file.
I'll get a release out in the next couple of days
Thank you @webark! I'll submit PR adding this option info to the readme
thanks
opt-in to address #365 until ember-cli-styles has stable release.
This would allow you to specify in
config/environment.js
:Avoid the deprecation
Reopening the Ember.Component super class itself is deprecated
if you do not use classic components (or the bindings on classic components, at least).Similar to https://github.com/salsify/ember-css-modules/pull/251 and https://github.com/simplabs/ember-test-selectors/pull/721.