This is because we use the mix ()
method in resources/views/layouts/APP. Blade. PHP
, but we haven’t run laravel mix to compile, and we can’t find the mix manifest. JSON
file, so we report an error. It’s OK. Next, we’ll solve this problem
Run laravel mix
Laravel mix is a front-end task automation management tool, which uses the mode of workflow to execute the formulated tasks in turn. Mix provides a simple and fluent API that allows you to define webpack compilation tasks for your laravel applications. Mix supports many common CSS and JavaScript preprocessors, and you can easily manage front-end resources through simple calls
It’s easy to use mix. First, you need to install NPM dependency with the following command. We will use yarn to install dependency. Before that, because of the domestic network, we need to configure the installation acceleration for yarn
yarn config set registry https://registry.npm.taobao.org
using yarn to install dependencies:
yarn install
after the installation is successful, run the following command:
npm run watch-poll
watch poll
will run continuously in your terminal to monitor whether the resource files in the resources
Folder have changed. When the watch poll
command is running, once the resource file changes, webpack will automatically recompile