Netlify.toml vs netlify.yaml

问题描述 投票:0回答:1

我对新的配置文件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"

您建议什么是最佳的做法?

deployment netlify
1个回答
0
投票

这是我在社区论坛(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.
© www.soinside.com 2019 - 2024. All rights reserved.