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:
# Dependencies
node_modules/
.pnpm-store/
vendor/

# Build outputs  
dist/
build/
out/
.next/

# Dev files
.git/
.vscode/
.idea/

# Logs and temp files
*.log
*.tmp
.DS_Store

# Environment files (optional - may want to include)
.env.local
.env.development

Pattern Syntax

The .shardignore file supports standard glob patterns:
PatternDescriptionExample
folder/Ignore entire directorynode_modules/
*.extIgnore files by extension*.log
filenameIgnore specific file.DS_Store
**/patternMatch in any directory**/*.test.js
!patternNegate (include) a pattern!important.log

Common Examples

Node.js Project

node_modules/
.pnpm-store/
dist/
build/
.next/
coverage/
*.log
.env.local

Python Project

__pycache__/
*.pyc
.venv/
venv/
.pytest_cache/
*.egg-info/
dist/
build/

General Development

# Version control
.git/
.svn/

# IDEs
.vscode/
.idea/
*.swp
*.swo

# OS files
.DS_Store
Thumbs.db

# Test files
*.test.js
*.spec.js
__tests__/

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.