Ignoring Source Paths
We highly recommend including the file
.nowignore. It is essential to deploying code to Now in a fast manner.
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 insert the path that you would like to ignore.
The syntax of that file is exactly the same as of a
.gitignore file (you can find the full specification here). As an example, this is how
.nowignore would have to look if you wanted to prevent the directories
dist from being uploaded:
We highly recommend taking advantage of this system for ignoring paths, as it will make creating deployments much 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.