Cropster / ember-l10n

A GNU gettext based localization workflow for Ember
MIT License
15 stars 7 forks source link

Ensure ember-l10n works with Prember #65

Closed mydea closed 4 years ago

mydea commented 4 years ago

Prember can be used to built static pages with Ember & FastBoot.

Prember will pre-render pages before the postBuild() hook is fired, leading to issues with the way we generate the manifest for FastBoot. Instead, we now generate the asset map via a Broccoli Plugin (in postprocessTree), which works as expected in both regular FastBoot as well as in Prember.

We also need to make sure this addon runs before ember-cli-uglify, as otherwise the postprocessTree hooks might conflict.

All changes are made under the assumption that everything works the same way as before for apps without FastBoot/Prember.

I have tested this in an app with FastBoot only, in an app with FastBoot + Prember, and in an app without FastBoot at all, and it worked as expected. It should also not have any effect on build time in apps without FastBoot (as the Plugin doesn't even run then).