function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Deborah Engelmeyer 4Deborah Engelmeyer 4 

exclude files from unlocked package

Is there a way to include files in a sfdx force:source:push, but exclude them in sfdx force:package:version:create?
Raj VakatiRaj Vakati
Yes .. .forceignore 

The .forceignore file excludes files when running the source commands: force:source:convert, force:source:push, force:source:pull, and force:source:status.

https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
Grant_at_TractionGrant_at_Traction
I am also looking for this functionality. We have certain tests that are used during development but that should not be included in the package itself. Using .forceignore prevents these from being tracked during development, which is a problem.