@now/static-buildvalidates a given
distDirconfiguration option, aborting a build if the output directory doesn't exist.
now.jsonbefore anything else – syncing, uploading, or deploying – because incorrect data from the beginning leads to unfavorable results in the end.
@now/static-buildbuilds content in the cloud and serves the static built output. It typically assumes that the final built artifacts exist in a
distdirectory, but in some cases, build tools have different outputs:
static, for example.
404 Page Not Founderrors on apps deployed on Now, we were able to identify that the source of confusion around these errors was that the output directory specified by a user in
now.jsonsimply did not exist.
404when accessed. While this is expected behavior in the builder and not technically a bug, it can lead to outcomes that users do not expect in the event of an invalid
masterwould automatically deploy a website using
@now/static-buildand immediately alias it to a user's chosen aliases. This could sometimes lead to a surprising 404 on production in the event that the output directory was incorrectly configured.
@now/static-build, this is no longer the case. The integration will abort, the check will fail, and the deployment will not occur. Your websites and applications stay up.
@now/static-builddo exactly this, and that our developers continue developing with the ease that they know and love from our tools. As always, we are open to your feedback, questions, concerns and praise. Feel free to reach out on Twitter.