Git Product home page Git Product logo

Comments (6)

Trackhe avatar Trackhe commented on June 12, 2024 1

Do you know what i missed? Because i cant get SSR working with the Production build: https://github.com/Trackhe/Vite-React-SSR-HMR
vitejs/vite#8449

from vite-plugin-react.

cyco130 avatar cyco130 commented on June 12, 2024

It seems to work when I add the async attribute to the preamble script.

from vite-plugin-react.

b3nten avatar b3nten commented on June 12, 2024

It seems to work when I add the async attribute to the preamble script.

Doesn't seem to be working for me unfortunately. The workaround seems to be loading the script as part of the stream.

from vite-plugin-react.

letientai299 avatar letientai299 commented on June 12, 2024

I hit this same problem and managed to find a work around. I put together a demo below. Perhaps someone with more knowledge on Vite could derives a proper solution to make React SSR more straight forward with Vite.

https://github.com/letientai299/vite-react-ssr-typescript

from vite-plugin-react.

ArnaudBarre avatar ArnaudBarre commented on June 12, 2024

Hi everyone!

I currently investigate open issues to work on a new API for the next major. I understand that there is an issue with renderToPipeableStream and script loading order, but I don't see any quick reproduction to look at it (only a closed PR on repo)

Can someone provide a small reproduction of the issue? Thanks

from vite-plugin-react.

github-actions avatar github-actions commented on June 12, 2024

Hello @jplhomer. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction will be closed if they have no activity within 3 days.

from vite-plugin-react.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.