In a discussion about theme assets in Discourse, hakonbja reports that assets added to the assets folder and referenced in about.json are available in SCSS but not appearing in settings.theme_uploads for JavaScript use — even after removal, assets persist in the settings object. merefield echoes confusion, noting settings.theme_uploads returns undefined in JavaScript computed properties, questioning when it’s safe to reference it. david clarifies that settings.theme_uploads was added recently and should be reliable, used internally in official themes. merefield resolves their issue: they had omitted the assets/ prefix in the asset path in about.json, causing the asset to be ignored and returning undefined in JS. Correcting the path (e.g., "background": "assets/background.png") fixed the problem. They confirm usage in an Ember component via settings.theme_uploads.background. merefield apologizes for the oversight and asks hakonbja if they resolved their issue.
For the last week or so I’ve been styling a Discourse setup for a brand which includes fixed fonts, logos and icons.
To begin with I noticed that any assets I imported (place in assets folder and import under the assets object of about.json) became immediately available to use as a SCSS variable but took a minute or two to show up in settings.theme_uploads.
Now however, they don’t show up at all in settings.theme_uploads which means I can’t use them in my JavaScript. If I remove an asset it also stays in the settings object. The SCSS usage stays unaffected.
The settings.theme_uploads data was added to javascript relatively recently (after the OP was written, I think). It should be reliable - we use it in our own themes/components. Can you explain in more details what issues you’re seeing?