ember-twiddle icon indicating copy to clipboard operation
ember-twiddle copied to clipboard

`{{content-for}}` hook of addons is not invoked

Open cibernox opened this issue 9 years ago • 2 comments
trafficstars

I've been trying the support for addons and worked like a charm except for this little detail.

Example with ember-power-select: https://ember-twiddle.com/b076c42b8529f3f95165dca5c82abef3/23f8fbca074bb26605b35448dd909453edf8b7f0

Apparently the content-for hook of the addon is not invoked, and therefore the destination div for ember-wormhole is not attached to the page automatically.

cibernox avatar Jul 01 '16 00:07 cibernox

@cibernox correct. This is because we basically only export addon js + css. You can view the addon builder code at https://github.com/joostdevries/twiddle-backend/blob/master/addon-builder/ember-cli-build.js.

A possible solution might be to modify the build process so that it outputs the {{content-for}} into separate html files which we can then add to addon.json and include into the HTML.

Do you have time to draft up a PR?

joostdevries avatar Jul 01 '16 09:07 joostdevries

I'll try to understand the build pipeline and see what I can do, but I don't have an ETA because I'm moving next week.

                📦 
               📦 📦 
            📦 📦 📦 📦 
          📦 📦 📦 📦 📦 📦 
🏡  🚚  📦 📦 📦 📦 📦 📦 📦 📦  

cibernox avatar Jul 01 '16 09:07 cibernox