Answer the question
In order to leave comments, you need to log in
How to access json through webpack?
Hey!
I include in the js file:
let name = require('../hello.json');
Webpack does build, json file is copied to build folder using file-loader.
But if we run the js file created by webpack
and refer to the name variable, we will get that
name = '../hello.json'
.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question