-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
Description
Describe the bug
If I have an mpa with base /foo/
where /foo/
is an app and /foo/ext/
another app, I get the pages from /foo/
normally (I've setup the configurePreviewServer plugin), but when trying to access pages from /foo/ext/
I'm getting "Cannot GET" error. The issue is non existent when changing the base from /foo/
to just /
.
Here is a minimal reproducible example with base /
: https://stackblitz.com/edit/vitejs-vite-6t3tnb
And here is a fork of the same project, but /foo/
as base: https://stackblitz.com/edit/vitejs-vite-ppmfrf
Steps:
On https://stackblitz.com/edit/vitejs-vite-6t3tnb
1 - npm run build
2 - npm run preview
3 - Access /ext/
or /ext/box/form/
and verify that it works
On https://stackblitz.com/edit/vitejs-vite-ppmfrf
1 - npm run build
2 - npm run preview
3 - Access /foo/ext/
or /foo/ext/box/form/
and verify that Cannot GET /foo/ext/
or Cannot GET /foo/ext/box/form/
occurs
Reproduction
https://stackblitz.com/edit/vitejs-vite-ppmfrf
System Info
System:
OS: Linux 5.18 Fedora Linux 35 (Workstation Edition)
CPU: (8) x64 Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz
Memory: 965.08 MB / 15.45 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node
Yarn: 1.22.10 - /usr/bin/yarn
npm: 8.19.0 - ~/.nvm/versions/node/v16.13.2/bin/npm
Browsers:
Chrome: 104.0.5112.101
Firefox: 103.0.2
Used Package Manager
pnpm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- 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 instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.