Skip to content

Commit

Permalink
Update regex for wildcard blitz route in webpack config (#3843)
Browse files Browse the repository at this point in the history
* update regex for wildcard blitz route in webpack config

* Create itchy-spoons-tan.md

* fix regex

* Update itchy-spoons-tan.md
  • Loading branch information
Dillon Raphael authored Sep 16, 2022
1 parent bf4aaf1 commit 0edeaa3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/itchy-spoons-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@blitzjs/rpc": patch
"blitz": patch
---

Allow for custom page extensions for the wildcard blitz route. For example [...blitz].api.ts. For more information vist https://nextjs.org/docs/api-reference/next.config.js/custom-page-extensions
2 changes: 1 addition & 1 deletion packages/blitz-rpc/src/index-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function installWebpackConfig({
webpackConfig.resolve.alias["npm-which"] = false
webpackConfig.resolve.alias["cross-spawn"] = false
webpackConfig.module.rules.push({
test: /[\\/]\[\[\.\.\.blitz]]\.[jt]sx?$/,
test: /[\\/]\[\[\.\.\.blitz]]?.+\.[jt]sx?$/,
use: [
{
loader: loaderServer,
Expand Down

0 comments on commit 0edeaa3

Please sign in to comment.