preact-router
preact-router copied to clipboard
router not linking if a file called routes.ts exists in the routes folder
trying to use preact-router 3.0.0, but it is not creating links, or accepting variables for paths
demo project: preact-demo.zip
if you open the page you get an undefined error from using a variable as path hardcoding it to a string works, and you can manually go to the url (once the serviceworker is installed)
but a tags created with <Link> (in the header component) do not work at all, looking at the html it makes an a tag, but doesn't actually give a href, making them unclickable
for got to add stacktrace of the error:
after some more digging around on slack this turned out to be 2 problems:
- you can't have any non component files in the reoutes folder, it turns them all into components when splitting, making things undefined
- just the existance of a file called routes.ts in the routes folder makes it unable to generate links, even if said file is not imported/used