You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use general purpose edge functions for vercel-adapter (#4883)
* Use `dest` instead of `middlewarePath`
This will use general purpose edge functions instead of our Middleware
infrastructure. This will support Cache-Control and also streamlines the
routing.
* Fix routing in `split: true`
* Add changeset
* Update packages/adapter-vercel/index.js
* Update packages/adapter-vercel/index.js
Co-authored-by: Rich Harris <[email protected]>
.replace(/\\\//g,'/')}(?:/__data.json)?$`;// TODO adding /__data.json is a temporary workaround — those endpoints should be treated as distinct routes
345
+
// remove leading / and trailing $/
346
+
.slice(1,-2)
347
+
// replace escaped \/ with /
348
+
.replace(/\\\//g,'/');
349
+
350
+
// replace the root route "^/" with "^/?"
351
+
if(sliced_pattern==='^/'){
352
+
sliced_pattern='^/?';
353
+
}
354
+
355
+
constsrc=`${sliced_pattern}(?:/__data.json)?$`;// TODO adding /__data.json is a temporary workaround — those endpoints should be treated as distinct routes
0 commit comments