Open nathan-bottomley opened 2 weeks ago
The RSS plugin swapped to an async plugin in v2.0.0 but I don’t think it was necessary to do so. I’m going to move it back to a synchronous plugin in v2.0.2. However, this will require a change in core, so it will have to wait for 2.0.0-canary.14.
In the mean time, the workaround is to await on the addPlugin call for the rss plugin, like so:
import rssPlugin from '@11ty/eleventy-plugin-rss'
export default async function(eleventyConfig) {
await eleventyConfig.addPlugin(rssPlugin)
}
Apologies, I flubbed this one on -alpha.14
. It’ll go up with core v3.0.0-alpha.15
.
I'm playing around with updating to version 2.0 of eleventy-plugin-rss. (I'm on Eleventy 3.0.0-alpha.13.)
I have a podcast plugin which I've written, which imports and adds eleventy-plugin-rss. That podcast plugin is imported and added to the main config file. I also have a nunjucks template which uses the filters supplied by eleventy-plugin-rss.
All this worked fine with eleventy-plugin-rss v1.x. With eleventy-plugin-rss v2.0, the filters don't get added to the main config.
However, if I add the podcast plugin to the main config file with
{ immediate: true }
, everything works fine.Here's a minimal repository illustrating the problem: https://github.com/nathan-bottomley/rss-test
I know that some changes have been made to the way plugin imports work, so I'm imagining that it's something to do with that. Having to add
{ immediate: true }
isn't such an imposition: I'm just not sure if that's how things are meant to work.