What values are available at each hook?

    preDeploy: async ({ constants }) => {
      // console.log({ opts })
      const { CACHE_DIR, BUILD_DIR } = constants // where we start from

at https://github.com/netlify/build/blob/59ca2005c27265ab879edd81be3cbbbf53fb4302/packages/netlify-plugin-no-more-404/index.js#L19-L21 suggests that each hook gets args with values we can use. However, the example in the readme for the preDeploy hook shows no args getting passed in.

Is there a place in the code I can look at to see what is available for each hook, and/or could the docs be updated to show what is available?

Hi @neverendingqs!

Thanks a lot for pointing this out.
I’ve added a GitHub issue so you track our progress on updating the documentation.
Until we properly document them, you can see the list of constants in our code here

1 Like

We have documented the values here: https://github.com/netlify/build/blob/master/docs/creating-a-plugin.md#plugin-constants
Thanks for pointing it out!

1 Like