Open boris-petrov opened 4 years ago
Transferred to ember-cli/ember-cli-htmlbars.
In general, I would think this already works properly. We have an explicit test in the babel plugin for this input:
If you could add another test to the broccoli plugin side (maybe there is an issue there and not in the babel plugin) like this:
That uses export default class extends Component {}
(anonymous class), then we could confirm if that is an issue or not.
@boris-petrov - A small reproduction would also be helpful here...
@rwjblue - sorry, I mentioned that there is a reproduction repo in the original issue I opened, I guess you've missed it. Here is the repo. Note that according to the other issue, ember-cli-typescript
has nothing to do with the problem and it appears even when you remove ember-cli-typescript
.
Ya, I was not really thinking it was an ember-cli-typescript issue, but I do think it is related to a combination of something else. For example, in that repro it looks like your input is leveraging a class decorator and we have https://github.com/ember-cli/ember-cli-htmlbars/issues/442 reporting issues in that scenario. We'd need to dig in and see if this is actually a duplicate of that issue...
Yeah, when @dfreeman poked at it, it looked like it was specifically to do with its being a decorated anonymous class—he could reproduce without ember-cli-typescript—but @boris-petrov's finding that it only showed up in his case when ember-cli-typescript was involved suggested to me that it is likely a matter of the ordering of the Babel plugins, since (until very soon now when we ship e-c-ts 4.0) e-c-ts impacts ordering of plugins.
Our ecosystem-level changes for ember-cli-babel and ember-cli-typescript should eliminate that as a cause of these kinds of things going forward, but that's likely (at least part of) the root issue there.
Is this the same as #442?
Well, in your previous comment you said that it could be... so it still could be. :smile:
🤦♂️ - totally missed that while triaging issues 😭
But the good news is, old me and current me happen to agree on something...
Moved from https://github.com/typed-ember/ember-cli-typescript/issues/1166 . There is a reproduction repo there.
cc @chriskrycho
Quote from Chris in Discord:
export default setComponentTemplate(template, class extends Component {});