ember-fastboot / ember-cli-head

Ember Cli Addon for Adding Content to HTML Head
MIT License
98 stars 34 forks source link

addon incompatible with Module Unification layout #52

Closed izelnakri closed 4 years ago

izelnakri commented 6 years ago

https://github.com/ronco/ember-cli-head/blob/master/app/components/head-content.js#L2 this needs to have a requirejs module check to see if head layout exists under src directory. Otherwise make the layout the usual /templates/head.hbs. I will take a stab at this.

izelnakri commented 6 years ago

https://github.com/izelnakri/mber-head/blob/master/app/components/head-content.js#L5 following code fixed it for me, I tried to manually. First I wanted to fork and create a PR first but the issue is I couldnt write automated test for this. It requires a module unification dummy app instead of the exisiting app structure, I couldnt figure out how to inject a different app in fastboot test environment which is a separate addon on its own.

Anyways you can see the implementation, its hacky but I dont know a better way to do it now based on the situation and the current implementation also uses private -document service. So I'll go along with my fork without a PR. Perhaps someone can write test and implementation in future to support module unification, then I wont have to maintain my fork.

@rwjblue I hope in future this head injection will be provided by default in ember.js framework.

knownasilya commented 4 years ago

Can be closed I think