@rspress/core 1.7.5 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4866,9 +4866,9 @@ async function createInternalBuildConfig(userDocRoot, config, isSSR, routeServic
4866
4866
  setupMiddlewares: [
4867
4867
  (middlewares) => {
4868
4868
  if (isPublicDirExist) {
4869
- middlewares.push(sirv(publicDir));
4869
+ middlewares.unshift(sirv(publicDir));
4870
4870
  }
4871
- middlewares.push(serveSearchIndexMiddleware(config));
4871
+ middlewares.unshift(serveSearchIndexMiddleware(config));
4872
4872
  }
4873
4873
  ]
4874
4874
  },
@@ -5320,7 +5320,7 @@ async function renderPages(appDirectory, config, pluginDriver, enableSSG) {
5320
5320
  helmet?.link?.toString(),
5321
5321
  helmet?.style?.toString(),
5322
5322
  helmet?.script?.toString(),
5323
- CHECK_DARK_LIGHT_SCRIPT
5323
+ config.themeConfig?.darkMode !== false ? CHECK_DARK_LIGHT_SCRIPT : ""
5324
5324
  ]).join("")
5325
5325
  );
5326
5326
  if (helmet?.htmlAttributes) {