Answer the question
In order to leave comments, you need to log in
How to open json file if it is in project folder?
There is a json file in my project folder. I need to connect it to a page / to a script in order to subsequently parse data from there, tell me, please, how can this be done?
Answer the question
In order to leave comments, you need to log in
I'm not sure if this will work in a non-Webpack/nodejs environment, but you can just import it directly in your script:
import * as data from "data.json"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question