I have been following the documentation for excluding file types from the
sfdx force:source:push command at https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_exclude_source.htm
It works fine for apex classes, custom objects, etc.
When given a directory structure like:
./force-app/main/default/aura/SearchResult ├── SearchResult.cmp ├── SearchResult.cmp-meta.xml ├── SearchResult.css ├── SearchResult.src.js ├── SearchResultController.js └── SearchResultHelper.js
.forceignore file in the root directory like:
> sfdx force:source:push PROJECT PATH ERROR ──────────── ─────── Unknown
Upon further investigation, it seems that after I make an update to any file in that bundle, the
force:source:push actually converts the source to the metadata API format + zip file with a package.xml that looks like:
<?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <name>AuraDefinitionBundle</name> <members>SearchResult</members> </types> <version>41.0</version> </Package>
This does not maintain any of the information provided by the
.forceignore file. Doing more investigation found the following error (which was masked by the
Unknown stated above):
UNKNOWN_EXCEPTION: Unable to handle Aura Definition \'SearchResult/SearchResult.src.js\': file extension expected'
Is there any way to achieve the ability to include files alongside within an AuraDefinitionBundle? The goal is to have an asset pipeline (like gulp) that converts things written in ES6, SASS, and writes the salesforce-compliant JS/CSS files before pushing to a scratch org. Given the current implementation, I can't figure out a way to do this without storing these source files in a different directory.
Any help would be greatly appreciated