score:0

Accepted answer

you can use next.js to serve static files.

store the svg files under your public directory rather than under src.

then you can generate urls pointing to those static files in your react template, instead of requireing them:

data && data.map((item) => (
      <img src={`/icons/${item['img']}.svg`} />
))

Related Query

More Query from same tag