I have some json files (svg) on the public folder that I used to load dynamically in NextJs.
import(`/jsons/vowels/${src}-ton.json`).then(setDataM);
import(`/jsons/vowels/${src}-lips.json`).then(setDataF);
}, [src]);
In Remix it fails:
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "application/json". Strict MIME type checking is enforced for module scripts per HTML spec.
Uncaught (in promise) TypeError: Failed to fetch dynamically imported module: http://localhost:8788/jsons/vowels/eh-lips.json
Isn't is possible to load files this way? It has to be via loader?