SCSS build problem with demin075.png

I scavenged this from Titan's vite.config.mjs:
server:
proxy:
"^(/systems/surge/style.css)": "http://localhost:30000",
server:
proxy:
"^(/systems/surge/style.css)": "http://localhost:30000",
Which works but I get the follwing warning on build
transforming (57) ../node_modules/@typhonjs-fvtt/runtime/_dist/svelte/math/index.jsnternal/index.jsK
/ui/denim075.png referenced in /Users/noeldacosta/Library/Application Support/FoundryVTT/Data/systems/surge/node_modules/@typhonjs-fvtt/runtime/_dist/svelte/component/core/application/TJSApplicationShell.svelte?svelte&type=style&lang.css didn't resolve at build time, it will remain unchanged to be resolved at runtime
✓ 79 modules transformed.
transforming (57) ../node_modules/@typhonjs-fvtt/runtime/_dist/svelte/math/index.jsnternal/index.jsK
/ui/denim075.png referenced in /Users/noeldacosta/Library/Application Support/FoundryVTT/Data/systems/surge/node_modules/@typhonjs-fvtt/runtime/_dist/svelte/component/core/application/TJSApplicationShell.svelte?svelte&type=style&lang.css didn't resolve at build time, it will remain unchanged to be resolved at runtime
✓ 79 modules transformed.
... which is odd because I'm not including that png anywhere. Any ideas?
1 Reply
TyphonJS (Michael)
This is a warning that is added to Vite for static references and unfortunately can't be turned off. It basically is saying hey you are referencing a static path and this might not be bundled into your final output; IE is external to the build and an asset that is part of the Foundry platform, so Vite has no context that this is fine. I did work around this in the upcoming TRL release by using CSS variables which aren't checked in the same way. There is no warning in the latest TRL when it drops.