Possible bug in `CustomEngine` with `this.entry`
Zearin opened this issue · 2 comments
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 but this.entry.compile
is undefined
.
A similar (but not identical) issue occured before the launch of Eleventy 2; see:
11ty/eleventy#2358
CC: @zachleat
ah, sorry—I’m a bit confused by this piece:
Line 27 in 230fa89
(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