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

Support adding external react code #29

Open
apstanisic opened this issue Feb 3, 2023 · 0 comments
Open

Support adding external react code #29

apstanisic opened this issue Feb 3, 2023 · 0 comments
Labels
enhancement New feature or request priority-low Low priority

Comments

@apstanisic
Copy link
Owner

apstanisic commented Feb 3, 2023

Now it's not possible to add custom pages and components, since we are simply building vite app, and serving it as a static files.
Simplest way to do this is for static part to be served normally, and user provided to be compiled with vite, and server as additional file user-custom.js, which admin panel can dynamically import.

Problem is that IDK if vite is to big dependecy. I do not want to that be user's responsability.
Other option is maybe to use import { } from "react-dom/server" since then app can be rendered on server, maybe???
This is prettier since user is not providing path to file, but code directly

Edit: ReactDOM is not the way, since I still have to provide code to rehydrate on client. I thought that that is not needed with streaming rendered, but I was wrong. So that leaves Vite

@apstanisic apstanisic added the enhancement New feature or request label Feb 3, 2023
@apstanisic apstanisic transferred this issue from another repository Mar 2, 2023
@apstanisic apstanisic transferred this issue from another repository Mar 2, 2023
@apstanisic apstanisic added the priority-low Low priority label Mar 2, 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 priority-low Low priority
Projects
None yet
Development

No branches or pull requests

1 participant