Using vite, I did a npm run build
for my mini react app.
It created a dist
folder containing index.html page with the assets folder.
But I want the <div id="root"></div>
from my index.html to be inserted into an already built website (custom traditional LAMP based without a framework) which will sit in one DIV at one corner or side of the webpage.
- So how do I insert this specifically ... because the JS and CSS filenames keep changing on every build.
<script type="module" crossorigin src="/assets/index-lmRs6HEq.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-n_ryQ3BS.css">
<div id="root"></div>
- How do I insert this in my LAMP site when in development (npm run dev) ?
I am looking for a clean build process without the need to support older methodologies since this is a new React (18/19) app.
- I am open to the same process for Vue3.