Add web components to your 11ty project using Stencil.
Open up your Eleventy config file (probably .eleventy.js) and use addPlugin
:
// .eleventy.js
const stencilPlugin = require("eleventy-plugin-stencil");
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(stencilPlugin);
};
Optionally pass in a Stencil config object as the second argument to addPlugin
to further customize this plugin.
// .eleventy.js
const stencilPlugin = require("eleventy-plugin-stencil");
module.exports = function(eleventyConfig) {
eleventyConfig.addPlugin(stencilPlugin, {
namespace: 'MyApp',
srcDir: 'src'
});
};