Wrong laravel mix rewrite url path when place project in subfolder
See original GitHub issueI did install my laravel project on http://localhost/laravel
and I run this project in browser at http://localhost/laravel/public
current url path on compiled scss files is font/vendor/something
, can laravel mix replace url path with relative path base on compiled scss like ../fonts/vendor/something
?
I knew if I run my project with php artisan serve
it won’t be a problem, what if I install my project in subfolder?
Issue Analytics
- State:
- Created 6 years ago
- Comments:19
Top Results From Across the Web
Wrong laravel mix rewrite url path when place project in ...
I added 'mix_url' => env('APP_URL', 'http://localhost'), on config/app.php and also set the APP_URL on env as per subfolder to solve this.
Read more >Wrong laravel mix rewrite url path when place project in ...
After a few struggle, I am able to resolve the issue, I have done the following changes. In .env added. APP_URL=http://localhost:8000 ...
Read more >CSS URL Rewriting | Laravel Mix Documentation
One key concept to understand is that Mix and webpack will rewrite any url() s within your stylesheets. While this might initially sound...
Read more >Compiling Assets (Laravel Mix)
Laravel Mix provides a fluent API for defining Webpack build steps for your ... Absolute paths for any given url() will be excluded...
Read more >Laravel 8 Images Path Not Working In Sub-Directory And ...
One key concept to understand is that Mix and webpack will rewrite any url s within dist/images folder and then rewrite the url...
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
I solved this problem using this:
{{ url(mix('/all.min.css')) }}
I added
'mix_url' => env('APP_URL', 'http://localhost'),
on config/app.php and also set the APP_URL on env as per subfolder to solve this.