Currently, to tracking custom element definitions in the WCC plugin, you have to provide them individually, e.g.
eleventyConfig.addPlugin(wccPlugin, {
definitions: [
new URL('./path/to/my-component.js', import.meta.url),
new URL('./path/to/my-other-component.js', import.meta.url)
]
});
It would be nice if this plugin could detect that a directory is provided, and just glob all the files within that, e.g.
eleventyConfig.addPlugin(wccPlugin, {
definitions: [
new URL('./path/to/my/components', import.meta.url),
]
});
Will need to make sure this is compatible with cache busting / live reloading in the plugin.
Couple questions / thoughts
- Should we just filter on .js / .ts files, or include CSS files too? (probably yes?)
Currently, to tracking custom element definitions in the WCC plugin, you have to provide them individually, e.g.
It would be nice if this plugin could detect that a directory is provided, and just glob all the files within that, e.g.
Will need to make sure this is compatible with cache busting / live reloading in the plugin.
Couple questions / thoughts