A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
chore(vercel): use absolute hrefs in preview dir indexes (#31106)
Issue number: internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? `generate_dir_index` in `core/scripts/vercel-build.sh` writes child links like `<a href="basic/">` and an up-link `<a href="../">`. Vercel doesn't 308-redirect to add a trailing slash, so visiting a preview directory URL like `/src/components/progress-bar/test` (no slash) returns the index page but the browser resolves `basic/` against the parent directory. That path doesn't exist, and Vercel's fallback serves the root landing page, so navigation looks like it "circles back" to the preview home instead of opening the test scenario. ## What is the new behavior? The dir-index generator now emits absolute hrefs based on the directory's `url_path`, including the `../` up-link. Trailing-slash quirks no longer affect navigation between component test scenarios on Vercel previews. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information Test page: - https://ionic-framework-git-fix-vercel-preview-links-ionic1.vercel.app/src/components/progress-bar/test Versus the broken version on main: - https://ionic-framework-git-main-ionic1.vercel.app/src/components/progress-bar/test
S
Shane committed
f8977021f96da7ff75e7292b82cda2bc93e80cfd
Parent: d26017f
Committed by GitHub <noreply@github.com>
on 4/30/2026, 4:27:46 PM