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

Disable server-side rendering in UI development mode #94

Open
2 tasks
lemmih opened this issue Dec 11, 2024 · 2 comments
Open
2 tasks

Disable server-side rendering in UI development mode #94

lemmih opened this issue Dec 11, 2024 · 2 comments

Comments

@lemmih
Copy link
Contributor

lemmih commented Dec 11, 2024

Summary

Right now, we rebuild both the front end and back end for every change, adding latency to the dev loop. Disabling server-side rendering and only building the front end when doing UI work may be beneficial. This only works when not adding or changing the server-side functions.

Alternatively, we could build the front end and back end in parallel. Right now, they're built sequentially.

Completion Criteria

  • Benchmark compiling the frontend and backend in parallel.
  • Add an environment in wrangler.toml to compile only the front end. This requires disabling server-side rendering.

Additional Links & Resources

@lemmih
Copy link
Contributor Author

lemmih commented Dec 11, 2024

For context, here's some timing data on my local machine:

CSS gen: 1.3s
Backend: 5.5s
Frontend: 3.8s

These steps are independent of each other and could be done in parallel. Reloading in 5s rather than 10s would be nice.

@lemmih
Copy link
Contributor Author

lemmih commented Dec 11, 2024

We can also skip the custom CSS file when developing. We can reference the non-minified Tailwind CSS file. However, this file is quite large and shouldn't be used in production.

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

No branches or pull requests

1 participant