How to use SNAP_USER_COMMON istead of SNAP_USER_DATA

I would like a simple configuration option in the yaml to make my snap use SNAP_USER_COMMON as storage for everything by default. What would be the best way to accomplish this?

As far as I know, the simplest way to do this is to require the application to support customizing the data storage directory through environment variables.

For example, I packaged an app called anki, which supports an environment variable called ANKI_BASE. I just need to change this variable to $SNAP_USER_COMMON.

And it’s done.