Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

最后一级路由带点的话404无法访问 #10210

Closed
Mulander-J opened this issue Sep 23, 2022 · 1 comment
Closed

最后一级路由带点的话404无法访问 #10210

Mulander-J opened this issue Sep 23, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists

Comments

@Mulander-J
Copy link

Describe the bug

host:port/hello.dot 可以内部跳转。但是刷新/直接访问会识别为文件导致404

如果是hashHistory 模式则正常访问。

const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/',
            name: 'root',
            redirect: '/hello.dot'
        },
        {
            path: '/hello.dot',
            name: 'PageA',
            component: ()=> import('./components/HelloWorld.vue')
        }
    ]
  })

Reproduction

none

System Info

"dependencies": {
    "vue": "^3.2.25",
    "vue-router": "^4.0.16"
  },
  "devDependencies": {
    "vite": "^2.9.9",
    "@vitejs/plugin-vue": "^2.3.3"
  }


### Used Package Manager

npm

### Logs

This localhost page can’t be foundNo webpage was found for the web address: http://localhost:3000/hello.dot
HTTP ERROR 404


### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitejs/vite/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitejs.dev/guide).
- [X] Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to [vuejs/core](https://github.com/vuejs/core) instead.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.
@sapphi-red
Copy link
Member

Duplicate of #2415

@sapphi-red sapphi-red marked this as a duplicate of #2415 Sep 23, 2022
@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Sep 23, 2022
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels Sep 23, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants