Closed Zearin closed 6 months ago
ah, sorry—I’m a bit confused by this piece: https://github.com/Zearin/eleventy-plugin-pug/blob/230fa890f35f26eddddb7c9ebc87f7745aa71d21/index.js#L27
(not saying this is bad code, just that I’m not confident it’s supported)
In the custom type here, it expects an object literal, not a new class instance: https://www.11ty.dev/docs/languages/custom/
Whoopsie daisy! 🤦
Q: Is there a way to check whether a class instance is passed into addExtension()
?
If so, Eleventy could throw an error at that earlier stage, to let future plugin authors know they are barking up the wrong tree :D
The basic minimal test case is not working. :-(
As best as I can figure…
Inside Eleventy’s
CustomEngine
class, when it comes time to compile,this.entry
exists butthis.entry.compile
isundefined
.A similar (but not identical) issue occured before the launch of Eleventy 2; see: https://github.com/11ty/eleventy/pull/2358
CC: @zachleat