-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Description
Symfony version(s) affected
6.3.12, 7.0.6
Description
Hello Helping folks,
I am coding my app with version 7.0.6 and saw asset mapper being used for delivering CSS.
I added app.css as mentioned in the assets folder of the project.
I am running a simple installation of apache2, php 8.3, mariadb on Ubuntu environment on virtual box
As mentioned here , the assets should be delivered to the web page using an inbuilt controller if the APP_ENV=dev and I don't have to compile them.
Unfortunately, I do not see the assets being delivered to web page in dev environment.
To mitigate it , I compiled the assets ( shouldn't need to ) in dev environment and files were added to my public folder.
I thought maybe I am not doing something correct so I purchased the course given at symfonycast in dev environment but to no luck.
What am I doing wrong here? or is some step missing?
Thanks a lot.
How to reproduce
Create any symfony project where asset mapper can be used ( please use dev mode)
Install symfony
Update/create assets/style/app.css and then change some values in css.
The css is not reflected on page load and the upon clicking the js file leads to 404 ( because it is not in public folder)
Possible Solution
Update:
Just found out after lot of debugging and researching, this only works good when we are using symfony local server run using command
symfony server:start
Is there anyway to run it using configurations above( using apache) ?
No response
Additional Context
No response