-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(redirects): attempt to get only params in dev mode (#8647)
* fix(redirects): attempt to get only params in dev mode * fixtures/ssr-redirect => fixtures/redirects * add tests * Update pnpm-lock.yaml
- Loading branch information
Showing
15 changed files
with
73 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': patch | ||
--- | ||
|
||
Fixed an issue where configured redirects with dynamic routes did not work in dev mode. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/redirects/src/pages/more/[dynamic].astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
export function getStaticPaths() { | ||
return [{ params: { dynamic:'hello' } }] | ||
} | ||
--- | ||
{JSON.stringify(Astro.params)} | ||
|
||
<a href="/">home</a> |
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/redirects/src/pages/more/[dynamic]/[route].astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
export function getStaticPaths() { | ||
return [{ params: { dynamic:'hello', route:'world' } }] | ||
} | ||
--- | ||
{JSON.stringify(Astro.params)} | ||
|
||
<a href="/">home</a> |
8 changes: 8 additions & 0 deletions
8
packages/astro/test/fixtures/redirects/src/pages/more/new/[...spread].astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
export function getStaticPaths() { | ||
return [{ params: {spread:'welcome/world'} }] | ||
} | ||
--- | ||
{JSON.stringify(Astro.params)} | ||
|
||
<a href="/">home</a> |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.