message: bundler plugin async bugs
diff: @@ -32,11 +32,6 @@ const defaults: Options = {
  export default function (userOptions?: Partial<Options>) {
  const options = merge(defaults, userOptions);
  - return async (site: Site) => {
  - site.loadAssets(options.extensions);
  - site.process(options.extensions, prepare);
  - site.process(options.extensions, bundler);
  -
  // Check configuration
  if (!options.options.bundle) {
  if (options.entries.length) {
  @@ -56,9 +51,19 @@ export default function (userOptions?: Partial<Options>) {
  );
  }
  - const includesSources = await downloadIncludes(options.includes);
  + return (site: Site) => {
  + let includesSources: Record<string, string> = {};
  let pageSources: Record<string, string> = {};
  + site.loadAssets(options.extensions);
  + site.process(options.extensions, prepare);
  + site.process(options.extensions, bundler);
  +
  + // Download all includes
  + site.addEventListener("beforeBuild", async () => {
  + includesSources = await downloadIncludes(options.includes);
  + });
  +
  // Clean the pageSources
  site.addEventListener("beforeUpdate", () => {
  pageSources = {};
  