Skip to content

bug: 当 history 为 hash 时,base 字段不生效,页面白屏无报错 #2233

@mainhanu

Description

@mainhanu

Version

2.4.14

OS Version

macOS 14

Node.js Version

20

Browser Version

chrome 131

Steps to reproduce

配置

import { defineConfig } from 'dumi';

export default defineConfig({
  outputPath: 'docs-dist',
  themeConfig: {
    name: 'test',
  },
  base: '/docs-dist/',
  publicPath: '/docs-dist/',
  history: {
    type: "hash"
  },
  exportStatic: false,
});

将 history 注释后,工作正常,history 设为 hash 后,页面访问白屏且无报错

What is expected?

在 hash 场景下,如果页面部署在非根目录下,该如何正确配置 base 字段?

What is actually happening?

页面访问白屏且无报错

Any additional comments? (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions