analogjs / analog

The fullstack meta-framework for Angular. Powered by Vite and Nitro
https://analogjs.org
MIT License
2.5k stars 240 forks source link

Feature: Move Vite/Nitro integration into a standalone plugin #318

Closed brandonroberts closed 1 year ago

brandonroberts commented 1 year ago

Which scope/s are relevant/related to the feature request?

platform

Information

Currently Analog uses Nitro underneath as its server engine, configured through an internal Vite plugin. This feature would separate the internal Vite/Nitro plugin from @analogjs/platform plugin into its package as @analogjs/vite-plugin-nitro.

This plugin would be framework agnostic and able to be used in any Vite application.

Describe any alternatives/workarounds you're currently using

No response

I would be willing to submit a PR to fix this issue

Yberion commented 1 year ago

What if we don't want to use nitro at all but use our own server implementation ?

You did something here https://github.com/Yberion/Angular-SSR-Common-Engine/pull/1, but from what I remember, it was still using nitro behind the scene and I would suspect that it could add some overhead and reduce the performance (I might be wrong).

It would be nice to have another plugin that don't rely on nitro for the server integration, something such as @analogjs/vite-plugin-server-common (or anything else)?

brandonroberts commented 1 year ago

It was using Nitro to build the server app, but none of the Nitro parts were being used there. Creating a separate plugin for server integration would also require building a new process for prerendering pages also.

It's possible, but would be a more substantial effort.

goetzrobin commented 1 year ago

I can work on this! Also open to look at another issue! Let me know where you think my time is spent best! 🚀

brandonroberts commented 1 year ago

You're welcome to pick it up! 🚀