Skip to content

Ignoring files

hiraiship deploy uploads the directory you deploy, minus the files below. Ignoring what the build doesn't need keeps the upload small and fast, and under the 25 MB limit.

Always left out

Whatever your ignore files say, these are never uploaded:

PathWhy
.git/Your repository's history isn't needed to build.
node_modules/Dependencies are installed on the build machine.
.hiraiship/The CLI's own link file.
.env, .env.*They usually hold secrets. Use environment variables instead. .env.example is still uploaded.

.gitignore

The .gitignore at the root of the deployed directory applies: files Git ignores aren't uploaded. Nested .gitignore files in subdirectories aren't read.

.hiraishipignore

A .hiraishipignore at the root, with the same syntax as .gitignore, is read after it. Use it to:

  • leave out files Git tracks but the build doesn't need:

    .hiraishipignore
    docs/
    *.mp4
  • bring back files Git ignores, with !. A prebuilt folder, for instance:

    .hiraishipignore
    !public/generated/

The always-left-out paths can't be brought back.

A symbolic link is uploaded only when it points inside the deployed directory. Links to elsewhere on your machine, and broken links, are skipped.

When the upload is too big

Above 25 MB, hiraiship deploy stops before uploading and lists the largest files:

Output
✖ Upload is 31.2 MB, above the 25 MB limit — add large files to .hiraishipignore.
Largest files:
    18.4 MB  assets/intro.mp4
     6.1 MB  data/seed.json

Large media usually belong on a storage service, not in the deployment.