[Vuejs]-Problems to import json with VueJs

0👍

Маке sure the path is correct, if you make import in file ./src/services/config.js with path “./json/data.json” it will look for json in ./src/services/json. Where exactly is your folder /json, if it is in src folder then import should be “../json/data.json”. Usually there is alias in web-pack “@” which is to “/src”, then import will be “@/json/config.json”

Leave a comment