Request local JSON data in a umi+dva environment

in the environment built with umi+dva, there is a JSON file in the directory, which cannot be accessed by axios request, and all html files are returned

Mar.05,2022

create a new public folder under the root directory, and put the json file
in this folder. The reason is related to the contentBase configuration. Restart the project

after modification.
Menu