In my project I've used XMLHttpRequest to get response from the json file as,

var url = 'http://localhost/json/<filename>.json

I'm sending request to localhost.

Now, when I bundle the app with webpack it doesn't include json folder and .json files within it, that's why application is unable to send request.

Please tell me how can I add json folder and all the .json files within it to the build.

I am using webpack 4 and 'NodeJS'

0 Answers