import mapsheets from './assets/images/mapsheets.svg';
import counters from './assets/images/counters.svg';
const files = {
'mapsheets.svg': mapsheets,
'counters.svg': counters
}
document.querySelectorAll('use[data-href*=".svg"').forEach(el => {
const [filename] = el.dataset.href.match(/.+\.svg/g)
, href = el.dataset.href.replace(filename, files[filename].split('/').pop())
;
el.setAttributeNS(null, 'href', href);
});