You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This issue can be recreated with nanojsx/template.
I found this issue on react-helmet, dealing with the same problem.
When using the nanojsx/template in production, the server side rendered script tag for /public/js/home.hydrate.js gets recreated, when using hydrate/render on the <HomePage /> component.
Steps to recreate:
Install template
Open file ./src/pages/HomePage.tsx
Make changes to the code:
import*asNanofrom'nano-jsx/lib/core'import{printVersion}from'nano-jsx/lib/helpers'//import TodoList from '../components/TodoList'import{HomePage}from'../pages/HomePage'consthydrate=async()=>{//Nano.hydrate(<TodoList />, document.getElementById('todo-list'))Nano.render(<HomePage/>,document.getElementById('content'))...}hydrate()
Run npm run build
Run npm run serve
Check inspector & console in DevTools
The text was updated successfully, but these errors were encountered:
This is normal. Inside <HomePage /> it tries to add the file /public/js/home.hydrate.js, which does not exist in production.
In production the file has a unique hash.
In my case it loads /public/js/home.hydrate.741d3b9d5a02efd363f6.js (SSR) and then /public/js/home.hydrate.js on the client (does not exist).
Describe the bug
This issue can be recreated with nanojsx/template.
I found this issue on react-helmet, dealing with the same problem.
When using the nanojsx/template in production, the server side rendered script tag for
/public/js/home.hydrate.js
gets recreated, when using hydrate/render on the<HomePage />
component.Steps to recreate:
./src/pages/HomePage.tsx
npm run build
npm run serve
The text was updated successfully, but these errors were encountered: