[Vuejs]-Import json file in laravel in vue component

0đź‘Ť

The assets folder is at the same level as your App.vue file (which you are importing the json file from).

In order to import something from the same level, you start your import path with ./

import jsonData from './assets/incomingData.json'

If you don’t use ./ webpack will try to find a package in node_modules named “assets”, instead of a folder.

Leave a comment