【发布时间】:2019-09-13 08:53:35
【问题描述】:
我需要注释掉 firebase.json 文件中的一些行:
例子:
"rewrites": [
// {
// "source": "/blog/*",
// "function": "handleBlog"
// },
{
"source": "**",
"destination": "/index.html"
}
]
在这种情况下,我想暂时禁用rewrite,但我不想删除代码。
事实是 JSON 文件不允许使用 cmets,我从 VSCode 中得到一个错误告诉我。
但是如果我将语言模式设置为JSON with Comments,VSCode 的错误就消失了。
但是这样做安全吗? Firebase 如何使用 cmets 处理 firebase.json 文件?
【问题讨论】:
-
jsonwith cmets 不再是json。它有jsonc文件扩展名。
标签: firebase visual-studio-code comments firebase-hosting firebase-cli