ember-asset-loader
ember-asset-loader copied to clipboard
Multiple meta tags inserted into head-footer when multiple addons use ManifestGenerator
When an application has more than one ember addon installed that exports a ManifestGenerator
-extended addon, a meta tag is inserted into the head-footer
content-for block because each addon has a contentFor
hook defined by ManifestGenerator
:
https://github.com/ember-engines/ember-asset-loader/blob/ad0d51898480b426c35853cdf441828c865cd375/lib/manifest-generator.js#L17
For example, with two addons that use ManifestGenerator
, before post-processing, the index.html may look like:
<meta name="my-app/config/asset-manifest" content="%GENERATED_ASSET_MANIFEST%">
<meta name="my-app/config/asset-manifest" content="%GENERATED_ASSET_MANIFEST%">
After post-processing, the first meta tag is replaced by the contents of the asset manifests provided by both addons, so it has all of the correct content, but there is an extraneous meta tag that remains:
<meta name="my-app/config/asset-manifest" content="%7B%22bundles%22%3A%7B%22...">
<meta name="my-app/config/asset-manifest" content="%GENERATED_ASSET_MANIFEST%">
Ideally even if multiple addons consumed by the host app are using ManifestGenerator
, only a single asset-manifest meta tag would be inserted, or the extra ones be removed during the post-processing when the manifest is being injected.
I am seeing this as well. I have tested with both an in-repo addon and an external addon.