Using Laravel 5.4 and Mix, when I run npm run watch it compiles everything once and looks like it is waiting for changes, but when I make changes to any of my asset files it doesn't seem to detect anything. Is anyone else having this issue in 5.4 or have a solution?

推荐答案

The solution was provided by Jeffrey Way over at Laracasts.

Try adding the --watch-poll flag to your package.json script. Or just try:

node_modules/.bin/webpack --watch --watch-poll --config=node_modules/laravel-mix/setup/webpack.config.js

Laravel相关问答推荐

Laravel中的HTTP请求如何工作?

密码确认在Livewire中不匹配

运行NPM Prod时出现VUE问题

assertSee 由于 html 代码中的空格而失败

无法在 Laravel 项目中安装 @vitejs/plugin-vue

如何在 Laravel 的外部 js 文件中包含 csrf_token()?

Laravel Blade:@stop VS @show VS @endsection VS @append

将 Laravel 升级到 4.2 后,Artisan::call('migrate') 不起作用

从 laravel/blade 中的数组创建逗号分隔列表?

Laravel 路由将变量传递给控制器

Laravel 5.5 类型错误:传递给 Illuminate\Auth\EloquentUserProvider::validateCredentials() 的参数 1 必须是实例

使用 laravel eloquent 关系检索除 NULL 之外的所有记录

如何在没有 Artisan 的情况下运行 Laravel?

如何仅在Blade模板存在时才包含它?

安装后在 Lumen 中找不到页面

laravel 5.1 在没有 VM 重启的情况下看不到作业(job)文件的更改

Laravel 分页漂亮的 URL

Laravel 数据库模式中的 MediumBlob

无法在控制器的构造函数上调用 Auth::user()

在哪里放置 Blade::extend