I created a simple snap by running ‘snapcraft init’ and put a file in snap/plugin folder. The file would be a custom plugin and alike.
Here is how everything goes
After the snap package is generated, I can see snap folder is shipped into prime folder as well.
I’m not sure if it’s an expected behavior for a snap creation. But it looks like a bug of snapcraft. It’s a little bit annoying if a project contains a bunch of custom plugins, such as x-shell.py, x-apache.py and so on as we really don’t want to ship these files into final package.