I tested changing this line to throw e; locally, which correctly reported the error "unknown block tag: rollup (via Template render error)"
Looks like this was just an oversight in this commit, which moved the promise code out of getCompiledLayoutFunctions into getCachedCompiledLayoutFunction:
Hi @glitchassassin
Good catch, I think your fix is the right way to go forward and a PR would be helpful. Do you want to create one? Otherwise I would do it.
Operating system
Ubuntu devcontainer
Eleventy
2.0.0-canary.29
Describe the bug
I added a rollup shortcode, but didn't have the
eleventy-plugin-rollup
plugin installed yet.The resulting eleventy build threw the error "reject is not defined" at TemplateLayout.js:211:
https://github.com/11ty/eleventy/blob/master/src/TemplateLayout.js#L211
I tested changing this line to
throw e;
locally, which correctly reported the error "unknown block tag: rollup (via Template render error)"Looks like this was just an oversight in this commit, which moved the promise code out of getCompiledLayoutFunctions into getCachedCompiledLayoutFunction:
https://github.com/11ty/eleventy/commit/8e2f974b9f21b480d2f201bd5e2bd24008e1e959
Reproduction steps
{% rollup "src/js/search.js" %}
(if rollup plugin is not installed)Expected behavior
Should report correct error
Reproduction URL
No response
Screenshots
No response