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 Next.JS #456

Open
doug-sheridan opened this issue Dec 15, 2020 · 5 comments
Open

Add support for Next.JS #456

doug-sheridan opened this issue Dec 15, 2020 · 5 comments

Comments

@doug-sheridan
Copy link

Add the ability to optionally use the Next.JS framework to build your React apps. I think if Slinky integrated the Next.JS framework and added the ability to pump out a Next app, Slinky is going to be truly the most scalable web framework in the world.

@no-identd
Copy link

💯. But I'd suspect that might have to wait for after #461?

@Asamsig
Copy link
Contributor

Asamsig commented Sep 13, 2021

I'll just mention my own WIP example of Slinky with Next.js, there certainly are pitfalls that will make your whole app break, but it is quite possible to write a Next.js app with Slinky.

Currently, some of the struggles that remain are how to make properly split code, since Scala.js module splitting sees function components as static initializers, they are all bundled together into the same file, thus making large apps quite ineffective at code-splitting.

Also, you'll have to use def every time you use something that only should run on the server, otherwise, it is bundled with the frontend bundle.

If time and motivation allow, I hope to be able to create a more comprehensive example/integration of Next.js into the Slinky/Scala.js ecosystem.

Repo can be found here: https://github.com/Asamsig/next-slinky-example

@shadaj
Copy link
Owner

shadaj commented Aug 24, 2022

I've started prototyping what Next.js integrations with Slinky could look like in #588. I'm seeing the same bundle splitting issue as @Asamsig, so trying to debug that since you end up losing a lot of the benefits when everything is in one bundle.

@shadaj shadaj added this to the v0.7.3 milestone Aug 24, 2022
@shadaj
Copy link
Owner

shadaj commented Oct 17, 2022

Tracking issue in Scala.js that prevents us from eliminating glue code: scala-js/scala-js#4742

@shadaj shadaj modified the milestones: v0.7.3, Backlog Dec 21, 2022
@shadaj
Copy link
Owner

shadaj commented Dec 21, 2022

We now have basic Next.js support, so moving this to backlog while we're blocked on upstream.

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

4 participants