[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble rendering webc template ./index.html (via TemplateContentRenderError)
[11ty] 2. rawContent.includes is not a function (via TypeError)
[11ty]
[11ty] Original error stack trace: TypeError: rawContent.includes is not a function
[11ty] at AstSerializer.compileString (file:///Users/oli/Code/webc-test/node_modules/@11ty/webc/src/ast.js:934:18)
...
Coercing the number to a string with String(1) fixes the error.
If this is a limitation of the implementation (I can see why you might not want to do any type coercion here) then maybe the error/docs could be updated to mention the string requirement?
The renderer crashes with a slightly confusing error if a JS component's final statement is not a string. E.g.
Produces this error:
Coercing the number to a string with
String(1)
fixes the error.If this is a limitation of the implementation (I can see why you might not want to do any type coercion here) then maybe the error/docs could be updated to mention the string requirement?