闭包编译器在 Mustache 标签上抛出错误

Closure compiler throwing error on Mustache Tag

我的代码中有一个小胡子标签 {{{customers}}}。当我尝试使用闭包编译文件时,它会抛出错误。

C:/index.js:289: 
ERROR - Parse error. '}' expected
    customers:{{{customers}}},

               ^

如何让编译器忽略这个字符串?

除了快速浏览一些描述它的页面之外,我不知道小胡子。它似乎是一个模板系统,这(我在这里有点猜测)意味着它需要 "mustache syntax" 并输出 JavaScript (看起来它也可以用其他语言输出)。

Closure 编译器期望有效 JavaScript。如果还有 "mustache syntax" 那么你还没有处理模板生效 JavaScript。