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

new rule no-exports-from-components needs exeptions #385

Open
TheElegantCoding opened this issue May 11, 2024 · 1 comment
Open

new rule no-exports-from-components needs exeptions #385

TheElegantCoding opened this issue May 11, 2024 · 1 comment

Comments

@TheElegantCoding
Copy link

Astro has some functions that can be exported in a file and has some logic with it

for example, in dynamic routing, we use getStaticPath to define the correct matching routes and this function has to have "export" inside the file.

i don't know if there more exceptions like this, the plugin could have exceptions for this cases and also for other specials cases

@ota-meshi
Copy link
Owner

Thank you for the report.
It appears that export const prerender = true; is also allowed.
https://docs.astro.build/en/guides/server-side-rendering/#opting-in-to-pre-rendering-in-server-mode
I don't know if there are more. How should I find out?...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants