Closed PierreAndreis closed 2 years ago
Hi @PierreAndreis! This is caused by how our Babel replacement works, would you be interested in submitting a PR to add support for this?
I have the same issue when using getServerSideProps as a function declaration, which I think is common usage.
export async function getServerSideProps() {
...
}
I changed it to a const arrow function and it started working.
Hi @vincaslt! That's surprising, as we do have a test for exactly this declaration:
Could you open a new issue for this, and give some more context on when it happens? A reproduction case would be great.
I have a feeling this could be fixed by #97 (published in v0.4.1), could you verify that?
Closing preemptively, feel free to re-open.
It seems that this plugin does not pick up
getServerSideProps
that are exported as below.Note that it works fine if we export as shown below, although less preferred