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

Enable bundling to support more runtimes #8

Open
robertherber opened this issue Oct 25, 2023 · 0 comments
Open

Enable bundling to support more runtimes #8

robertherber opened this issue Oct 25, 2023 · 0 comments
Labels

Comments

@robertherber
Copy link
Member

robertherber commented Oct 25, 2023

We want to enable bundling with bun build to easily support a wide range of runtimes.

Right now many files (primarily in routes and graphql packages) are dynamically imported which doesn’t include them in the main bundle. To do this we need to:

  • Add a build step where we create files statically importing files we currently import dynamically (to be used by for example the routes and graphql middleware). We want to abstract this away (I think we probably want to still dynamically import in dev and test mode).
  • Ensure static files (.graphql and other non-code-files) are handled correctly).
  • Make it easy to bundle for different targets. ’bun build’ supports targeting bun and node, in most cases I suppose bundles build for node would support many other runtimes as well.

Purpose:
This way we can keep the source code (even in published libraries) in TypeScript, no need for a build step when publishing plugins. And still produce bundles that can be used on as many runtimes as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant