Confused about purpose of the default property for inputs in manifest.yml

Is the “default” property of inputs supposed to be available in the operation of a plugin?
While developing a plugin… unless I explicitly define an “input” value in the netlify.toml, the “input” is undefined in plugin code execution. Even if the manifest.yml has a default.

So is the manifest.yml just for documentation?
If so, why do so many existing plugins list defaults for inputs, but never set a default in their plugin code?

Hey @moop-moop,
The manifest.yml is not just for documentation. I found Tara Manicsic’s tutorial on this really helpful:

And you probably already know about this repo but dropping it here for future readers of this post:

That said, it is surprising that you would get undefined if you set a default value in the manifest.yml. Can you share your repo or a deploy log?

Hi @moop-moop,

As @jen mentioned, if you set a default for one of your inputs in your manifest.yml, and a user of your plugin is not defining that input, Netlify will use the default value instead.

If this is not the behavior you are experiencing, please share a link to your plugin (if public) and a link to a deploy. Thanks!

I made it public @jen , it was started from your template @ehmicky
https://github.com/UWHealth/netlify-plugin-jest/tree/moop-moop/initial-work

This is great @moop-moop!

Would you like to submit this plugin to our list of plugins so it shows up in the Netlify app? We are currently adding some guidelines here.

I will eventually @ehmicky, but need to solve the multiple manifest.yml issues I am having first.
No defaults still from manifest.yml and latest netlify-cli version causing new not found problems for me.

Nathan Morris

Which new problems are you experiencing? We can help fix this.

I never solved the manifest.yml defaults not being available, but now the new issue is a bigger problem.
New issue:
Started after your last update of netlify-cli and @netlify/build

Oh, I am actually looking into that problem. It got reported here as well: Deploys are failing with local plugin · Issue #1373 · netlify/build · GitHub
Thanks for raising this up.

This should be fixed now.
Please let us know if you’re still experiencing any problems. Thanks!

Seems to be good, thanks.
My manifest.yml defaults are available.

2 Likes