Exclude Files from Deployments with .Esadaxignore

Author:Vishal Singh
Updated:Aug 11, 2025

The .Esadaxignore file is a powerful tool for managing deployments on Esadax. It allows you to specify which files and directories should be excluded during the deployment process.

Overview

The .Esadaxignore file works similarly to a .gitignore file but is specific to Esadax. By placing this file in your project's root directory, you can exclude certain files and directories from being uploaded or served on Esadax.

How It Works

  1. Default Exclusions: All files are excluded by default unless specified otherwise.
  2. Including Files: To include a file or directory, add its name prefixed with ! in the .Esadaxignore file.
  3. Structure: The file should be placed at the root level of your project.

Example Usage

To exclude specific files and directories:

.Esadaxignore image private.html

This will prevent the /image directory and /private.html file from being uploaded.

Advanced Use Cases

  • Allowing Specific Files: Add !file_name to allow a specific file.
  • Ignoring All Files: Start with /* to ignore all files in the root directory.
    .Esadaxignore /*
    
  • Combining Rules: Use multiple lines to create complex rules.

Monorepos and Workflows

  • In a monorepo, the .Esadaxignore file at the project root takes precedence over any other configuration.
  • If no .Esadaxignore is found, Esadax uses the one at the root level.

Best Practices

  1. Security: Use it to protect sensitive files like private.html.
  2. Efficiency: Upload only necessary files, reducing deployment size and improving speed.
  3. Compliance: Ensure compliance with specific project requirements by excluding unnecessary files.

By leveraging the .Esadaxignore file, you can streamline your deployment process while keeping your project secure and efficient.