run hot the server root path isn't public ?
See original GitHub issuenpm run hot.
Request http://127.0.0.1:8080/css/app.css
got 404 error.
If I mv public/css/app.css
to Laravel project root path, then request http://127.0.0.1:8080/app.css
is successful.
Have any params to set the root path ?
"hot": "node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Avoid public folder of laravel and open directly the root in web ...
I just want to avoid the 'public' in www.mylaravelsite.com/public/ and make it like www.mylaravelsite.com for the root directory. Now I do not want...
Read more >Why is the root directory on a web server put by default in "/var ...
Usage of /var/www is confusing only at first sight. According to the FHS, web server data should go to /srv . That is...
Read more >Public Path - webpack
Public Path. The publicPath configuration option can be quite useful in a variety of scenarios. It allows you to specify the base path...
Read more >live-server - npm
Use it for hacking your HTML/JavaScript/CSS files, but not for deploying the ... --open=PATH - launch browser to PATH instead of server root...
Read more >PHP Include from Root - CSS-Tricks
The problem is that PHP can see a bit “deeper” into your servers file system than HTML can. For example, the public web...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Finally i was able to make this - (v1.2.0) Just add these to your
webpack.mix.js
Run command
npm run hot
, wait for build Access your virtual host as normal, for examplehttp://laravel-app.dev
Do NOT try to accesshttp://localhost:8080
(this is where most people get confused) Any change made in./resources/assets
folder files should reflect on virtual host domain. Make sure you’re usingmix()
blade helper to load assets.@JeffreyWay The docs should be updated to reflect this.
@nelson6e65 Laravel mix is already doing the same
https://github.com/JeffreyWay/laravel-mix/blob/9fbd97915bfab2027dfb8f80ceac484915f5c88d/src/builder/WebpackConfig.js#L66-L73