Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

JoaoHamerski's avatar

How to run a development server in Laravel Mix (standalone project)

standalone project = without using Laravel

I'm trying to run a server to see my project on browser, the only way i can do it is running npx mix watch --hot, so after that my project start running at localhost:8080.

But the above command enable hot reload, i would like to know if there is some specific command to just run the server, without enabling hot reloading.

I tried npm mix watch but it not starts the server, just watch the files.

Tried calling manually webpack server with:

./node_modules/.bin/webpack serve --config="./node_modules/laravel-mix/setup/webpack.config.js"

This works (the server starts at localhost:8080 as well) but somehow it activates hot reloading too, idk why.

So, there is some way to just start the server? Without enabling hot reloading?

Here is my webpack.mix.js file:

let mix = require('laravel-mix');

mix.sass('src/scss/app.scss', 'dist/css/')
  .js('src/js/app.js', 'dist/js/').react()
  .setPublicPath('public');

0 likes
0 replies

Please or to participate in this conversation.