Dynamically add content to index.html from Ember app

I know how you can dynamically add content to the index.html file of a consuming app, from an addon, using addon.contentFor.

Is there a way to do this from the app itself? For example, I’d like to import a function from a common node module, which is then called in my apps ember-cli-build file with some app specific variables as arguments. The function would then return some static HTML which is then added to index.html.

I used to do this kind of thing with ember-cli-inline-content but that doesn’t seem to work in Embroider/vite apps.