-
-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Twig file changes are not working with "watch" or "dev-server" #1246
Comments
After spending some days, I found an alternative solution, you can see here: webpack/webpack#17918 (comment) But I hope we will get an official default integrated solution |
Thank you for this issue. |
The builtin webpack watcher is integrated with the dependency graph.
|
Note that adding the dependency in postcss is better than using |
I am using bootstrap and to avoid getting all unused classes for my build folder, I am also using "postcss-purgecss" which removes unused classnames.
The problem is that webpack does not load my postcss config if there is no changed files by "watch", if I add "mt-5" classname for example, it will not detect this change because it is inside a ".twig" file and not "js or css". To be able to get the "mt-5" class i need to do some changes inside "assets" or re run the "npm run watch"...
I tested this solution: https://symfony.com/doc/current/frontend/encore/dev-server.html#live-reloading-when-changing-php-twig-files
It reloads the browser on each twig file change which is cool, but it does not reloads my assets, I need to change any css or js file to be able to get my classname built
Originally posted by @sovetski in #1026 (comment)
The text was updated successfully, but these errors were encountered: