我有一个sample.11ty.js文件,包含以下代码:
module.exports = "<p>sample</p>";
在njk布局文件中,我尝试sample.11ty.js像这样包含上述文件:
{% include "components/sample.11ty.js" %}
该sample段落不显示,但控制台出现以下错误:
Reference Error: module is not defined
如何在模板中包含
.11ty.js文件?njk