-
-
Notifications
You must be signed in to change notification settings - Fork 51
feat: use Netlify Frameworks API #315
feat: use Netlify Frameworks API #315
Conversation
🦋 Changeset detectedLatest commit: ff9febc The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
packages/netlify/src/index.ts
Outdated
notFoundContent, | ||
})}); | ||
export const config = { name: "Astro SSR", generator: "@astrojs/netlify@${packageVersion}", path: "/*", preferStatic: true }; | ||
export const config = ${inspect(config)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used inspect
and not JSON.stringify
because we had an issue with accept string literals as keys. This was fixed in netlify/build#5745, but it's not something we can back-port to older versions of the Netlify CLI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the version is dynamic, so would it be cleaner to inline the whole thing like before instead of this rather painful workaround?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in b8186e7.
packages/netlify/src/index.ts
Outdated
}, | ||
TRACE_CACHE | ||
); | ||
const config = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't look like this is ever used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's used on line 262
Changes
Updates the Netlify adapter to use the upcoming Frameworks API.
Testing
Tests updated.
Docs
Internal change, no user-facing changes are expected.