我跑完之后
php artisan ui vue --auth,
我正在做npm安装没有问题,但当我运行npm run dev时,它显示如下错误
ERROR in ./resources/js/components/ExampleComponent.vue 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <template>
| <div class="container">
| <div class="row justify-content-center">
webpack compiled with 1 error
如何解决这个问题?
1条答案
按热度按时间zyfwsgd61#
如laravel mix documentation中所述,为了使用Vue js,必须在webpack.mix.js文件(在项目的根文件夹中)中使用
mix.vue()
命令。例如:
而不是这样: