require-json
require('require-json') lets you load JSON files using require syntax. For example: var config = require('./config.json');
Usage no npm install needed!
<script type="module">
import requireJson from 'https://cdn.skypack.dev/require-json';
</script>