Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for actions on / (index) route #101

Open
1 task done
leonceaklin opened this issue Feb 28, 2024 · 0 comments
Open
1 task done

Add support for actions on / (index) route #101

leonceaklin opened this issue Feb 28, 2024 · 0 comments

Comments

@leonceaklin
Copy link

Describe the feature

I think it would be great if the library supports form actions on the / route via server/actions/index.ts. Currently this is not possible, because the parser recognizes index.ts as a form action for the route /index:

export function getActionRoute(actionPath: string) {
const actionRegex = /.*actions[\/\\](.*?)\.ts/
const actionRoute = actionRegex.exec(actionPath)?.[1]
if (!actionRoute) throw new Error(`Could not parse action route from ${actionPath}`)
return actionRoute
}

Additional information

  • Would you be willing to help implement this feature?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant