If you're using a bundler like Parcel, I believe you can simply use the CommonJS syntax to require("myfile.json") it. Unsure if this is exactly what you're looking for, but hope it helps!
No, sorry, but thanks for your contribution, it means a lot!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.