我正在寻找比这更清洁的方式:
<script>
import list from '../../../../../../../storage/app/public/json/listofcuisines_en.json';
export default {}
</script>
如何?
答案 0 :(得分:0)
您可以在webpack.mix.js
mix.webpackConfig({
resolve: {
alias: {
"@": path.resolve(
__dirname,
"your_path_to_source_folder"
)
}
}
});
然后在组件
中<script>
import list from '@/storage/app/public/json/listofcuisines_en.json';
export default {}
</script>