What is .shardignore?
The.shardignore file controls which files and folders are excluded from deployment when using the ShardCloud VS Code extension. It works similarly to .gitignore.
Files matching patterns in
.shardignore will not be uploaded to ShardCloud, reducing deployment size and time.Creating .shardignore
Create a.shardignore file in your project root directory:
Pattern Syntax
The.shardignore file supports standard glob patterns:
| Pattern | Description | Example |
|---|---|---|
folder/ | Ignore entire directory | node_modules/ |
*.ext | Ignore files by extension | *.log |
filename | Ignore specific file | .DS_Store |
**/pattern | Match in any directory | **/*.test.js |
!pattern | Negate (include) a pattern | !important.log |
Common Examples
Node.js Project
Python Project
General Development
Best Practices
Always Exclude Dependencies
Dependencies are installed automatically on ShardCloud.
Exclude Build Outputs
Build artifacts are regenerated during deployment.
Keep Config Files
Include
.shardcloud and necessary config files.Review Before Deploy
Check what’s being uploaded in the extension output.
Troubleshooting
Files still being uploaded
Files still being uploaded
Ensure the pattern is correct. Directory patterns should end with
/.
Check for typos in file/folder names.Application fails after deploy
Application fails after deploy
You may have ignored essential files. Review your
.shardignore and ensure
source files and configs are included.Deployment is slow
Deployment is slow
Add more patterns to exclude large directories like
node_modules/, build
outputs, and test files.