hookrouter
hookrouter copied to clipboard
Import returning error "is not a module" when try to use hookrouter with CRA + typescript
Hello Devs.
To the owner repo or who wants to help him
I'm catch error when a import this module in my app component.
[App.tsx]
this is my package.json
[package.json]
For developers who want to solve the problem superficially until the owner of the repo solves it
I managed to fix this error by migrating the route config to a file called routes.js, it seems that the problem happens only in tsx | ts extensions!
after migrating the route settings, it looked like this:
[routes.js]
and in my App.tsx file, it looked like this:
[App.tsx]
I hope I have helped in some way. 😄
See #147 for another workaround.
Or downgrade from 1.2.5 to 1.2.3.