million icon indicating copy to clipboard operation
million copied to clipboard

feat: nextjs plugin for autoblocking

Open Milo123459 opened this issue 2 years ago • 11 comments

Is your feature request related to a problem? Please describe. Sometimes, using Million can require complex code changes in a Next app.

Describe the solution you'd like A next plugin could solve this by automatically using Million blocks without having to do any code changes.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

Milo123459 avatar Mar 10 '23 16:03 Milo123459

Would this involve the Next.js compiler? I think this can follow a structure similar to what y'all used for Vite.

cytronicoder avatar Mar 22 '23 13:03 cytronicoder

Yeah, it would. The idea is that it is automatic, so it would be hooking into some low-level APIs. But, this won't work very well in most apps because it doesn't support hooks.

Milo123459 avatar Mar 22 '23 16:03 Milo123459

FYI, this is next up. Already have some ideas around how hooks / callbacks can be implemented

aidenybai avatar Apr 08 '23 00:04 aidenybai

Nice!

cytronicoder avatar Apr 08 '23 23:04 cytronicoder

Next up is to solve the SSR story of Million to start development of this plugin

aidenybai avatar Apr 12 '23 20:04 aidenybai

Next up is to solve the SSR story of Million to start development of this plugin

Pun intended? 🥹🥹. Next is up next.

tobySolutions avatar Apr 12 '23 20:04 tobySolutions

Any updates y'all? I'm very interested in this issue.

tobySolutions avatar Apr 20 '23 13:04 tobySolutions

#316

aidenybai avatar Apr 20 '23 20:04 aidenybai

https://twitter.com/aidenybai/status/1650406345517199361?s=20

aidenybai avatar Apr 24 '23 07:04 aidenybai

it's great news that full support for next is out, but the plugin technically speaking isn't. i asked in the discord and you said you were working on it.

Milo123459 avatar Apr 24 '23 15:04 Milo123459

ah good catch. let's reopen this issue

aidenybai avatar Apr 24 '23 17:04 aidenybai

Our current direction is focused on primitives that allow developers to opt-in to block rendering. When we get to a point where blocks are very stable and support SSR/RSC, and there is a use case from a project, then we can reconsider this issue.

aidenybai avatar Jul 16 '23 19:07 aidenybai

just kidding i lied @Milo123459

very, VERY soon :)

aidenybai avatar Jul 27 '23 01:07 aidenybai

awesome! we've got a vite plug-in, so I guess the logic could be carried over to a next plugin?

Milo123459 avatar Jul 27 '23 05:07 Milo123459

@Milo123459 it should automatically work in both vite & next out of the box

aidenybai avatar Jul 27 '23 05:07 aidenybai

wtf that's awesome well done

Milo123459 avatar Jul 27 '23 05:07 Milo123459

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days.

github-actions[bot] avatar Nov 03 '23 00:11 github-actions[bot]