I have a sample.11ty.js file, containing the following code:
module.exports = "<p>sample</p>";
In a njk layout file, I tried to include the above sample.11ty.js file like so:
{% include "components/sample.11ty.js" %}
The sample paragraph does not display, but there is the following error in the console:
Reference Error: module is not defined
How can I include a
.11ty.jsfile in anjktemplate?