feat(@astrojs/netlify): add build.split support#7615
Conversation
🦋 Changeset detectedLatest commit: c42b3dc The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
sarah11918
left a comment
There was a problem hiding this comment.
Two copy-paste names to address, otherwise, Docs is fine with this! 😄
bluwy
left a comment
There was a problem hiding this comment.
LGTM. Also confirmed that changesets would auto-bump the underscore-redirects dep for the dependants on release.
| './fixtures/split-support/.netlify/functions-internal/src/pages/entry.index.astro.mjs', | ||
| import.meta.url | ||
| ); | ||
| const { handler } = await import(entryURL); |
There was a problem hiding this comment.
The test seems to fail in windows here. using entryURL.toString() or entryURL.href should fix it I think.
There was a problem hiding this comment.
Looks like it didn't work 🤔 The string should start with file:// on Windows since C:\ or D:\ looks like a protocol to node.
a35d7a5 to
6f086fd
Compare
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
547e70f to
b3a4fcc
Compare
c256547 to
235a915
Compare
b009466 to
fedd0fa
Compare
916564f to
3365840
Compare
3365840 to
1d52532
Compare
179db59 to
35491aa
Compare
35491aa to
c42b3dc
Compare
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Changes
This PR adds
build.splitsupport for the@astrojs/netlifyadapter.List of changes:
@astrojs/underscore-redirectspayload to accept aMapinstead of an array of routes and a dynamic target. This logically makes more sense compared to the previous logic, because a route is mapped to a dynamic target (even though we could have duplicates);@astrojs/underscore-redirectsallowed me to create redirects correctly usingRouteData->URLentry pointTesting
Added new test cases
Docs
Updated the
README.mdand added a changeset. It's a copy-paste from the Vercel one./cc @withastro/maintainers-docs for feedback!