How to get JSON content in EJS file [WEBPACK]
问题 I want to get values from an external JSON file and use these values in my EJS file which is compiled as HTML by webpack. My JSON & EJS working properly. I trying things like that in my EJS : <%= require('./components/products.json') %> But the only output (in a HTML file) i get at the render is : "components/products.json" I've tried to use Fetch but at bundle time Webpack don't recognize it. And also tried to pass it in a variable but same result. The objective is to display images's URL