DockYard / ember-maybe-in-element

Conditionally render content elsewhere using #-in-element on ember apps
MIT License
15 stars 10 forks source link

Add dirty workaround for AST plugins in wrong order #16

Closed simonihmig closed 5 years ago

simonihmig commented 5 years ago

@cibernox As I wanted to update to the latest ember-in-element-polyfill, but without having to migrate away from ember-maybe-in-element, I took a look at the failing issue in #15 we talked about a while ago.

I remembered that I had to do some trickery regarding the order of AST plugins for an older version of the polyfill, where it had some explicit support for ember-maybe-in-element: https://github.com/kaliber5/ember-in-element-polyfill/blob/9aeec71d12dd6db9586097ffc11f94d30d6120cb/index.js

Applying the same tricks here seems to fix the issue!

And I certainly agree that this look ugly as hell, sorry about that! 😬

simonihmig commented 5 years ago

Btw, this PR is targeting the feature branch of #15, adding an additional commit. Just to be clear!

cibernox commented 5 years ago

@simonihmig sorry for the delay, I've been detoxing from the computer. Merged!

cibernox commented 5 years ago

@simonihmig I came back today from holidays and I tested this but sadly it doesn't seem to work when installed in an addon: https://github.com/cibernox/ember-basic-dropdown/pull/476

0.3.0 contains your changes. 0.4.0 is a re-publish of 0.2.0 reverting your changes.