Allow to opt out of classic component patching#376
Conversation
|
@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 #342 (comment) (or maybe another one but with the same idea behind) |
|
@webark moving forward we'll definitely migrate to |
|
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 deprecatedif you do not use classic components (or the bindings on classic components, at least).Similar to salsify/ember-css-modules#251 and mainmatter/ember-test-selectors#721.