Skip to main content

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:

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.
Don’t ignore your .shardcloud config file or essential source files needed for your application to run.

Troubleshooting

Ensure the pattern is correct. Directory patterns should end with /. Check for typos in file/folder names.
You may have ignored essential files. Review your .shardignore and ensure source files and configs are included.
Add more patterns to exclude large directories like node_modules/, build outputs, and test files.