Describe the bug
I have used preact-cli to create a new TypeScript project and have made zero changes to the code. I then run preact build --no-prerender to generate the production files.
When I hit the index.html in a browser the home page loads fine but when I click the "Me" nav link, I get the error "Uncaught TypeError: Cannot read properties of undefined (reading '__H')". If I click the "John" link, that route loads fine and then clicking on the "Me" link again also loads fine the second time.
If I refresh the browser on any route other than the home page, I also get the same error.
To Reproduce
- Run npx preact-cli create typescript test
- Run preact build --no-prerender
- Browse the index.html of the production build
- Navigate to the Me link in the nav (error occurs).
- Naviugate to the Jonn link in the nav (no error).
- Refresh the John link in the nav (error occurs).
I'm assuming this must be something specific in my environment but I'm not sure how to figure out what is causing this problem, so any pointers are greatly appreciated.
Describe the bug
I have used preact-cli to create a new TypeScript project and have made zero changes to the code. I then run preact build --no-prerender to generate the production files.
When I hit the index.html in a browser the home page loads fine but when I click the "Me" nav link, I get the error "Uncaught TypeError: Cannot read properties of undefined (reading '__H')". If I click the "John" link, that route loads fine and then clicking on the "Me" link again also loads fine the second time.
If I refresh the browser on any route other than the home page, I also get the same error.
To Reproduce
I'm assuming this must be something specific in my environment but I'm not sure how to figure out what is causing this problem, so any pointers are greatly appreciated.