-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow dynamic route segments in isr.exclude array (#10513)
* Allow dynamic route segments in isr.exclude array * copy over eslint-disable as well * add test * update test: slashes dont need to be escaped * update changeset --------- Co-authored-by: lilnasy <69170106+lilnasy@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
69 additions
and
3 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,17 @@ | ||
--- | ||
"@astrojs/vercel": minor | ||
--- | ||
|
||
The `isr.exclude` configuration can now include routes with dynamic and spread parameters. | ||
```ts | ||
export default defineConfig({ | ||
adapter: vercel({ | ||
isr: { | ||
exclude: [ | ||
"/blog/[title]" | ||
"/api/[...slug]", | ||
] | ||
} | ||
}) | ||
}) | ||
``` |
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
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
8 changes: 8 additions & 0 deletions
8
packages/integrations/vercel/test/fixtures/isr/src/pages/excluded/[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 @@ | ||
<html> | ||
<head> | ||
<title>Dynamic</title> | ||
</head> | ||
<body> | ||
<h1>Dynamic</h1> | ||
</body> | ||
</html> |
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