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

bundle adapters in hattip to ease adoption #56

Open
samuelstroschein opened this issue Mar 28, 2023 · 6 comments
Open

bundle adapters in hattip to ease adoption #56

samuelstroschein opened this issue Mar 28, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@samuelstroschein
Copy link

Problem

  1. Hattip only has a few hundred downloads on NPM making the decision to adopt hattip harder.
  2. Adapters are separate packages. Developers have to download multiple hattip dependencies slightly lowering DX but, more importantly, spreading the downloads of Hattip across multiple packages.

Sugesstion

Bundle all adapters in hattip like hattip/adapter/node.

  • the npm downloads of all hattip packages are bundled, leading to more downloads and thereby easing adoption
  • the deployment pipeline becomes easier because only one package needs to be deployed

We had a similar discussion for inlang opral/monorepo#460 (comment)

@samuelstroschein samuelstroschein changed the title bundle adapters in hattip bundle adapters in hattip to ease adoption Mar 28, 2023
@cyco130
Copy link
Member

cyco130 commented Mar 28, 2023

Hi we're working on a Vite based CLI that will bring a very convenient DX. It's only semi-functional right now but when it's ready in a few days, it will feel like using one of Vite-based metaframeworks like SvelteKit, Rakkas, or Astro, minus the frameworK.

There will also be a project initializer (npm init hattip) that will allow you to create a project either using the Vite-based CLI or without using any build tool for targets that support it.

I'll close this when we release the CLI.

@samuelstroschein
Copy link
Author

The CLI won't address the outlined problems :)

If the CLI is yet another package on NPM, the downloads will be split among yet another npm package. You can bundle everything hattip related in one npm package to incentivise people to adopt hattip due to higher downloads on NPM.

Thinking out loud here on how to drive adoption for hattip

@brillout
Copy link
Member

We've plans to significantly increase the number of HatTip users. I think the number of npm downloads won't be an issue then.

@cyco130
Copy link
Member

cyco130 commented Mar 29, 2023

The CLI won't address the outlined problems :)

Yes, but the hattip package will. My wires got crossed between this and the other conversation :)

@samuelstroschein
Copy link
Author

We've plans to significantly increase the number of HatTip users. I think the number of npm downloads won't be an issue then.

We are interested. Running into multiple issues with express right now. Our architecture is unusual. One server runs everything. Modules export handlers that are imported by the server. So kinda a monolith but not really. Most things are split by module.

Large downside:

  • how to get HMR for external dependencies in a monorepo?

@brillout
Copy link
Member

Vite handles linked npm packages as ssr.noExternal, so AFAICT HMR should work just fine with your setup.

@brillout brillout added the enhancement New feature or request label Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants