Can i write over a module js file in Magento 2?
- What are the cons doing it?
- Are there any build in functions that allows me to write to a modules file (I know php allows it).
The problem - I have data in database that I want to use in autocomplete field. The idea is that when the data gets updated in databases then Magento 2 overwrites the file where the array of the file is stored? Are there any cons when the array contains about 100+ variables?
What would demand more resource, fetching data from db with ajax or storing it in a js file?