Issues with view.json file

The view.json file isn't very useful from a version control standpoint currently IMO. I actually have it on my .gitignore list because all the transient data in makes a diff useless.

Ex. a simple table component that has 100 transient "production order" objects will produce a view.json 10k lines long, one of which is a mission critical script.

I am sure I could use grep + a git hook to grab the good stuff but I wanted to reach out first.

If you're making proper use of the 'Persistent' attribute on your component properties, you shouldn't be ending up with unnecessary data being serialized into your view.json.
Regardless of how you configure things, git ignoring view.json means you're not actually storing your views in Git. By definition, the project resource type that is a view is stored entirely in the view.json.

2 Likes