honojs / create-hono

CLI for creating a Hono app
50 stars 14 forks source link

Improve bundle size #66

Open goisaki opened 3 weeks ago

goisaki commented 3 weeks ago

The binary size of create-hono is currently 1.39 MB. This is clearly larger than ~create-remix (93.3kB)~(with dependencies) and create-vite (56.9kB) and should be improved.

These are some of the ways to improve:

I have already tried all of this locally and can make a PR right away. I would like to hear @yusukebe, @ryuapp, and @MathurAditya724's opinions on these changes.

yusukebe commented 3 weeks ago

Hi @goisaki

Here are my thoughts:

goisaki commented 3 weeks ago

Hi @yusukebe What do you think about @clack/prompts? It has a very cool UI, small size and also a graceful message on exit.

yusukebe commented 3 weeks ago

@goisaki

Looks good. But can you create the UI similar to the current version with @clack/core not using @clack/prompts?

goisaki commented 3 weeks ago

hi @yusukebe

Understood. As such, I will make a PR.

  1. It would be more effective to migrate the chalk of the duplicate feature package to picocolors (which @clack/core depends on, smaller in size), is that ok?

  2. I would also like to hear why we need to keep a similar UI and only use @clack/core. If “UI” means “behavior” (excluding appearance), then we can make it look better without changing the content or order of the prompts.

    I am positive about changes/improvements to the look and feel because it makes the experience better.

yusukebe commented 2 weeks ago

@goisaki

  1. It would be more effective to migrate the chalk of the duplicate feature package to picocolors (which @clack/core depends on, smaller in size), is that ok?

Yes.

  1. I would also like to hear why we need to keep a similar UI and only use @clack/core.

Because I like the way it looks now. Also because I worry that using @clack/prompts will make it look like any other create-* that uses it.