Open BryceRussell opened 1 month ago
Blocked until support for injecting actions is added: https://github.com/withastro/roadmap/blob/actions/proposals/0046-actions.md#integration-actions
Current recommendation is to export an action from the theme package for users to configure themselves
// package/actions.ts
import { defineAction, z } from 'astro:actions';
export const someActions = () => {
like: defineAction({
// ...
})
}
// project/src/actions/index.ts
import { defineAction, z } from 'astro:actions';
import { someActions } from 'my-theme/actions';
export const server = {
...someActions()
};
Add support for the new experimental actions API from Astro
Things to consider: