Ignoring Source Paths
We highly recommend including the
.nowignore file in your Now deployment. It is essential in uploading only the required paths to Now, increasing the speed of the initial deployment process.
In this document, you will learn the file's exact function and how to use it.
By default, all files within your project are uploaded (not served, just uploaded) to Now.
In order to prevent a path within your project from being uploaded to Now, you need to create a
.nowignore file and add the path that you would like to ignore.
The syntax of a
.nowignore file is exactly the same as a
.gitignore file (you can find the full specification here). As an example, this is how
.nowignore would look if you wanted to prevent the directories
dist from being uploaded:
.nowignorefile, preventing the
dist directories from being uploaded.
We highly recommend taking advantage of this system for ignoring paths, as it will make creating deployments both faster and cheaper.
Only files that are matched by the
src property of a Build are "considered for serving", the Builder you defined decides whether a file is then actually served.
If you did not define a
now.json file containing one or more Builds, however, all files within your project will be served.
The only exceptions are
.nowignore, which will not be served if you did not explicitly define a Build with a
src property that matches their names.
See the documentation on Deployment Basics, Builds and Builders to learn more: