我是 Laravel 的新手,我遇到了一个问题,当我使用
laravel new or the
composer create-project laravel/laravelcommands, there will be no webpack.mix.js file created into my project. When the creation is finished there is info that
No publishable resources for tag [laravel-assets].` 创建一个新项目时。我不知道如何解决它。
我正在使用 Windows 10 和 PHP 8.1.11 版本。
我尝试运行
composer update
并尝试对这个问题做一些修复:我的 node_modules 中没有 webpack.mix.js,但它们都没有帮助。
也许是时候学习如何使用
Laravel vite
.
或者如果你想迁移到 laravel mix,请在此处查看:
https://github.com/laravel/vite-plugin/blob/main/UPGRADE.md#migrating-from-vite-to-laravel-mix
也检查这个问题:
我对“也许你应该学习……”这样的回答感觉不太好。 任何人都应该自己决定使用什么。 但是,如果您决定使用 webmix,则可以。 请按照以下步骤操作:
https://github.com/laravel/vite-plugin/blob/main/UPGRADE.md#migrating-from-vite-to-laravel-mix
希望这有帮助。