[BUG] ReferenceError: options is not defined in src/.eleventy.js
Closed this issue · 3 comments
sudkumar commented
Bug Description
In a recent release of 0.2.0
, we introduced filter
option to only process matched files. But accidentally, the .eleventy.js
was also modified which caused this bug.
module.exports = {
- configFunction: (eleventyConfig, options) => {
+ configFunction: (eleventyConfig, providedOptions) => {
addAmpTransform(eleventyConfig, options);
As we can see the options
is replaced with providedOptions
in the function arguments but not in the calls to other plugin functions.
Possible Solution
Simply reverting the change will fix the issue i.e.
module.exports = {
- configFunction: (eleventyConfig, providedOptions) => {
+ configFunction: (eleventyConfig, options) => {
addAmpTransform(eleventyConfig, options);
sudkumar commented
PR #22
@sebastianbenz Please have a look.
sebastianbenz commented
This has been published in 0.2.1 - thanks again for fixing!
sudkumar commented
Thank you for this awesome plugin. ❤️