Integration with webpack #12
Replies: 2 comments
-
The whole idea behind this bundle is to have an easy way to have runtime configurable settings in symfony applications. Using them as compile time variable would contradict that idea. It should not be to complicated, to expose the settings entities to an API (via something like API Platform) and then retrieve them dynamically on the frontend. However I guess every user has different requirements for that and use different security models, so im not sure how much common functionality for that can be put in the bundle. |
Beta Was this translation helpful? Give feedback.
-
Yes, i totally got your point. I've added this idea based on the code i've already had. I'll refactor it to grab settings from a certain api endpoint. This way i won't need to rebuild js and will keep the logic in one place. |
Beta Was this translation helpful? Give feedback.
-
Any thoughts of any integration with webpack? As of today, i read some variables from .env file to build javascript using webpack.
Eg:
When using AppSettings (ORMStorageAdapter), i have to fetch settings directly from db, eg:
Just wondering if there's a better way to handle this.
I would need also to rebuild entire javascript after updating settings.
Beta Was this translation helpful? Give feedback.
All reactions