I tried multiple approaches but didn’t get them working reliably with Angular + Salesforce static resources. What did work is using a relative path from the SCSS file to the asset. For example:
content: url(../../../vx-grid-resources/assets/icons/checked-box.svg);
This works because:
../../../
walks up three folders relative to the SCSS file’s location.
Then it points directly to vx-grid-resources/assets/icons/checked-box.svg
.
Angular correctly copies these into the vx-grid-assets/
folder during build, so the relative path resolves after deployment.
So far, this has been the only reliable way I’ve found — you need to use the relative path instead of trying ./vx-grid-assets/...
or absolute /vx-grid-assets/...
, which either don’t compile or don’t resolve correctly at runtime in Salesforce.