aidenybai / million

Optimize React performance and make your React 70% faster in minutes, not months.
https://million.dev
MIT License
15.93k stars 559 forks source link

feat: add support for bun bundler #544

Closed AdamBoyleSignpostr closed 8 months ago

AdamBoyleSignpostr commented 10 months ago

Describe the feature

Trying to find a simple way to use millionjs with bunjs Am using the bun bundler. However, bun.js understands typescript and also tsx/jsx.

Am using import { renderToReadableStream , renderToString} from "react-dom/server";

wouldlike to wrap my components with millionjs, but I would prefer to do the transform serverside rendering. using renderToReadableStream , renderToString. Am not seeing a way to do this without applying vite to the project. However, I don't need vite, so I would prefer to not.

Additional information

tobySolutions commented 10 months ago

Hmm, so what do you suggest? 🤔🤔

renhiyama commented 9 months ago

Alright, seems like this issue has been inactive for a while, let me know if I should work on this. Packit (from reejs framework) can be used to fully customize and be used for barebones project, without a compiler. It supports loading vite/unplugin/rollup based plugins to some extent, doesn't compile/process any code unless asked for and is fully extensible as long as you know what you're working with.

But I doubt whether this would solve your problem though. What you're looking for is to use millionjs natively with Bun's bundler, and not using millionjs without any framework. I would suggest reconsidering your life choices issue title and change it something to "Support Bun Bundler natively"

Drex72 commented 9 months ago

@renhiyama , if you would like to work on it, no problem so you would like this issue to be assigned to you then?

renhiyama commented 9 months ago

@Drex72 I'm currently not free. Feel free to work on your own

Drex72 commented 9 months ago

@Drex72 I'm currently not free. Feel free to work on your own

I'm also currently not free, but i'd check it out and maybe we could talk on the discord so you can tell me about the approach you wanted to use for this?

renhiyama commented 9 months ago

@AdamBoyleSignpostr @tobySolutions please consider renaming this issue to "add support for bun bundler" or smt similar.

github-actions[bot] commented 8 months ago

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.

tobySolutions commented 8 months ago

Thanks @renhiyama, closing this for now