---
tags: Laravel, livewire, fix
---
# 修正 Livewire 的 「The published Livewire assets are out of date」 問題
Issue Solved: after adding this code to my `composer.json`
```php=
"@php artisan vendor:publish --force --tag=livewire:assets --ansi"
```
> To keep the assets up-to-date and avoid issues in future updates, we highly recommend adding the command to the post-autoload-dump scripts in your composer.json file:
```php=
{
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi",
"@php artisan vendor:publish --force --tag=livewire:assets --ansi"
]
}
}
```
|