-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
https://symfony.com/doc/master/best_practices/web-assets.html
There's been some confusion & discussion in IRC about Symfony's best practices regarding frontend.
As of this moment, the best practices page talks about:
- Storing your assets in web/
- Assetic
- Angular, Bower, GruntJS
- Assetic again
For a newcomer, this is confusing to see after you take a look at https://symfony.com/doc/current/frontend.html which is now mostly "Encore" stuff. The purpose of this issue is to at least start a discussion about what should be on the Best Practices - Web Assets page.
In IRC, samsch brought up what I think is a good point - that for some lightweight frontends, introducing Encore/Webpack potentially just makes it more complicated than it needs to be. e.g. If you have a simple UI and really only need like 10 lines of JS per page.
My opinion is that the best practices page needs to only talk about two things:
-
Lightweight UI - Very small amount of JS & CSS
Talks about storing your assets in web/ and referencing with{{ asset(...) }}
-
Single Page Applications (SPAs) & Complex Frontends
Talks about using Encore/Webpack, storing source files outside of web (in assets?), having them built into web/build/, or maybe just points to https://symfony.com/doc/current/frontend.html
Thoughts, ideas, opinions?