@rspress/core 1.7.3 → 1.7.5

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
@@ -4192,6 +4192,11 @@ async function extractPageData(replaceRules, alias, domain, root, routeService2)
4192
4192
  selector: "img",
4193
4193
  format: "skip"
4194
4194
  },
4195
+ {
4196
+ // Skip code blocks
4197
+ selector: "pre > code",
4198
+ format: "skip"
4199
+ },
4195
4200
  ...["h1", "h2", "h3", "h4", "h5", "h6"].map((tag) => ({
4196
4201
  selector: tag,
4197
4202
  options: {
@@ -4852,8 +4857,10 @@ async function createInternalBuildConfig(userDocRoot, config, isSSR, routeServic
4852
4857
  node: ["node >= 14"]
4853
4858
  };
4854
4859
  return {
4860
+ server: {
4861
+ port: !isProduction() && process.env.PORT ? Number(process.env.PORT) : void 0
4862
+ },
4855
4863
  dev: {
4856
- port: process.env.PORT ? Number(process.env.PORT) : void 0,
4857
4864
  progressBar: false,
4858
4865
  // Serve static files
4859
4866
  setupMiddlewares: [
@@ -4863,11 +4870,7 @@ async function createInternalBuildConfig(userDocRoot, config, isSSR, routeServic
4863
4870
  }
4864
4871
  middlewares.push(serveSearchIndexMiddleware(config));
4865
4872
  }
4866
- ],
4867
- historyApiFallback: {
4868
- // not support fallback the requested path which contain a . (DOT) character by default
4869
- rewrites: [{ from: /.*\.html/, to: "/" }]
4870
- }
4873
+ ]
4871
4874
  },
4872
4875
  html: {
4873
4876
  favicon: normalizeIcon(config?.icon),