Compiling with Laravel Mix #920
-
Posted on behalf of @prafful98 who filed the following issue: On running
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Because Laravel upgraded its base installation to include Laravel Mix 6, there could be an issue when running the If you've run into this issue or something similar, let's step through a few files and make sure everything is right where it should be. package.json Check your // Laravel Mix <v6
"dev": "npm run development",
"development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --config=node_modules/laravel-mix/setup/webpack.config.js",
"watch": "npm run development -- --watch",
"watch-poll": "npm run watch -- --watch-poll",
"hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --disable-host-check --config=node_modules/laravel-mix/setup/webpack.config.js",
"prod": "npm run production",
"production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --config=node_modules/laravel-mix/setup/webpack.config.js" // Laravel Mix >=v6
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production" webpack.mix.js The previous version of Laravel Mix didn't have the // Laravel Mix <v6
mix.js('resources/js/canvas-ui/app.js', 'public/js/canvas-ui.js')
.sass('resources/sass/canvas-ui.scss', 'public/css/canvas-ui.css'); // Laravel Mix >=v6
mix.js('resources/js/canvas-ui/app.js', 'public/js/canvas-ui.js').vue()
.sass('resources/sass/canvas-ui.scss', 'public/css/canvas-ui.css'); From there, you should be ready to run the compilation again. |
Beta Was this translation helpful? Give feedback.
Because Laravel upgraded its base installation to include Laravel Mix 6, there could be an issue when running the
canvas:ui
Artisan command and compiling for the first time.If you've run into this issue or something similar, let's step through a few files and make sure everything is right where it should be.
package.json
Check your
package.json
file and locate thescripts
entry. If you're not using Laravel Mix 6, then you won't have access to the Mix CLI. Make sure the following blocks match the version you're running: