message: fix(feed2): fix build issue
diff: @@ -7,7 +7,7 @@ import {
  import { injectLinkstoHead } from "./injectHead";
  import { FeedGenerator } from "./generator";
  -import type { Page, PageFrontmatter, Plugin } from "@vuepress/core";
  +import type { PageFrontmatter, Plugin } from "@vuepress/core";
  import type { FeedOptions, FeedPluginFrontmatter } from "./types";
  export * from "./types";
  @@ -27,34 +27,26 @@ const feedPlugin: Plugin<FeedOptions> = (options, app) => {
  const output = getOutput(feedOptions.output);
  const feedLinks = getFeedLinks(feedOptions, output, app);
  - const pages: Page[] = [];
  -
  return {
  name: "feed2",
  - /**
  - * Store pages for future usage
  - */
  - extendsPageData($page): void {
  - if (!feedOptions.filter) pages.push($page);
  - else if (
  - typeof feedOptions.filter === "function" &&
  - feedOptions.filter($page) &&
  - isFeed($page.frontmatter as PageFrontmatter<FeedPluginFrontmatter>)
  - )
  - pages.push($page);
  - },
  -
  onPrepared(): void {
  injectLinkstoHead(feedOptions, app);
  },
  - async onGenerated(): Promise<void> {
  - const feedPages = (
  - typeof feedOptions.sort === "function"
  - ? pages.sort(feedOptions.sort)
  - : pages
  - ).slice(0, feedOptions.count);
  + async onGenerated(app): Promise<void> {
  + const feedPages = app.pages
  + .filter(
  + (page) =>
  + !feedOptions.filter ||
  + (typeof feedOptions.filter === "function" &&
  + feedOptions.filter(page) &&
  + isFeed(
  + page.frontmatter as PageFrontmatter<FeedPluginFrontmatter>
  + ))
  + )
  + .sort(feedOptions.sort)
  + .slice(0, feedOptions.count);
  await new FeedGenerator(
  feedPages,
  