我对新的配置文件netlify.yaml感到有些困惑。我以为它将替代netlify.toml,但是如果没有toml文件,则会出现以下错误:
No netlify.toml found. This is needed to configure the function settings. For more info: https://github.com/netlify/netlify-lambda#installation
当他们两个都在时我有
failed during stage 'Reading and parsing configuration files': Multiple potential Netlify configuration files in "/opt/build/repo": netlify.toml, netlify.yaml
我想访问“插件”功能,不确定在配置的toml版本中是否存在,因为这似乎不会触发任何事情:
[[plugins]]
type = "./.netlify/plugins/xxx"
您建议什么是最佳的做法?
这是我在社区论坛(https://community.netlify.com/t/netlify-toml-vs-netlify-yaml/6482/2)上收到的回复:
We haven’t quite finished implementing the json and yml support, but these are the docs: https://docs.netlify.com/configure-builds/file-based-configuration/#json-and-yaml-configuration-files .
It is definitely not implemented in the private beta for build plugins yet, so you’ll need to stick with toml as the docs advise.