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

Get layout is not working anymore after adding plugin #129

Closed
Haberkamp opened this issue Aug 5, 2022 · 6 comments
Closed

Get layout is not working anymore after adding plugin #129

Haberkamp opened this issue Aug 5, 2022 · 6 comments

Comments

@Haberkamp
Copy link

I've added the plugin to my next.js app and fetching dates worked fine but the layouts we're missing completely.

next.js version: 12.2.4
superjson version: 1.9.1
babel-plugin-superjson-next version: 0.4.3

@Skn0tt
Copy link
Member

Skn0tt commented Aug 8, 2022

Hi @Haberkamp! Could you share a reproduction repository? That'd make it a lot easier for me to reproduce this.

@Haberkamp
Copy link
Author

Yes! Here you go. After starting the server visit the /layout route. When you comment out the getServerSideProps variable of that page you'll be able to see the layout again.

@Skn0tt
Copy link
Member

Skn0tt commented Aug 10, 2022

thx for the repro! I was able to reproduce and fix the error, it had to do with the order of the code emitted by this babel plugin.

@all-contributors please add @Haberkamp for bug

@allcontributors
Copy link
Contributor

@Skn0tt

I've put up a pull request to add @Haberkamp! 🎉

@Skn0tt Skn0tt closed this as completed in bf1c4fa Aug 10, 2022
Skn0tt added a commit that referenced this issue Aug 10, 2022
place wrapped export default at end of file (Closes #129)
@Skn0tt
Copy link
Member

Skn0tt commented Aug 10, 2022

published in https://github.com/blitz-js/babel-plugin-superjson-next/releases/tag/v0.4.4 :)

@Haberkamp
Copy link
Author

Yea thank you!

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