I have a need for multiple .forceignore
files in my Salesforce DX project. The reason for this is that there are files that I would like to have in development (scratch orgs) but I do not want to deploy back to the packaging org when we are ready to build a new version.
Before trying to use a .forceignore
file to exclude files when deploying, I was just manually removing the references from the package.xml
but this was time consuming and won't scale well. I then realized I should just be using a .forceignore
to do this.
My question is if anyone has run into the same scenario and what was your solution? One solution I thought of is just to comment out the lines when pushing to scratch and uncomment them when deploying but this isn't very elegant. Any advise or experience is appreciated.