I'm looking for a much cleaner way than this:
<script>
import list from '../../../../../../../storage/app/public/json/listofcuisines_en.json';
export default {}
</script>
How?
You can use webpack resolve in webpack.mix.js
mix.webpackConfig({
resolve: {
alias: {
"@": path.resolve(
__dirname,
"your_path_to_source_folder"
)
}
}
});
and then in component
<script>
import list from '@/storage/app/public/json/listofcuisines_en.json';
export default {}
</script>