使用 composer 安装 Laravel Compiling Assets (Mix)

Install Laravel Compiling Assets (Mix) with composer

是否可以仅使用 composer 安装和 运行 Laravel 编译资产 (Mix)?

Mix is based on webpack which requires node.js 编译资产(js 和 css)。

所以你需要在你的服务器上安装节点然后运行(取决于你的设置):

npm run build

没有

Composer 用于 PHP 个软件包

Laravel 混就是编译JavaScript。你用 npm 安装它。