How to inherit JSON vue objects?

From laravel is a strong plus default support Vue. Deal with it. Everything is clear only when it came to practice webpack complains

so inherit json
apiWorkers import from '/workers.api'; // address of url from laravel full path too does not plow

export default {
data(){
return{
 btn_txt: "Search",
apiWorkers
}
}
}

I understand he couldn't assemble the arrays because there is another json file, and run the VUE is loaded before Laravel.

So he gathered:
the <script>
apiWorkers import from './workers.json'; //regular file in the same folder

export default {
data(){
return{
 btn_txt: "Search",
apiWorkers
}
}
}
</script>


But I cannot each time to generate the file. How to be in this situation?
June 8th 19 at 16:25
1 answer
June 8th 19 at 16:27
Solution
I can something I do not understand, but usually any "JSON files" provides an API, which you write in the backend and in the Assembly, they just did not fall, and requested AJAX'ohms.

Find more questions by tags Vue.js