Daydreamer-riri / vite-react-ssg

Static-site generation for React on Vite.
https://vite-react-ssg.netlify.app/
MIT License
97 stars 4 forks source link

Should write in the docs that the index.html must have id="root" #26

Closed stouch closed 2 weeks ago

stouch commented 2 weeks ago

Should put a sample of the index.html in the docs with

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="icon" type="image/x-icon" href="/favicon.ico">
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.tsx"></script>
  </body>
</html>

because if it's id="app", it does not work.

Daydreamer-riri commented 2 weeks ago

https://github.com/Daydreamer-riri/vite-react-ssg?tab=readme-ov-file#configuration

The documentation mentions that there is a configuration item called rootContainerId, which determines which element to mount in. The default is root.