title: How to dynamically import a json file
body: <p>I'm trying to import a JSON file on my Vite app, whose paths are dynamically generated. So the <code>import</code> path for this JSON includes variables.</p>
  <p><a href="https://i.stack.imgur.com/NhoCO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NhoCO.png" alt="enter image description here" /></a></p>
  <p>I know it's possible to do it with <code>require</code>, but I'm working with Svelte, and <a href="https://github.com/sveltejs/svelte/issues/4775" rel="nofollow noreferrer">I cant use requires</a>.</p>