Open maitzeth opened 3 years ago
I hit this issue myself. Every component rendered by your Router
will be imported indirectly when you import your routes file. Images, CSS and other files that require custom loaders will consequently fail to load in the node environment. Furthermore, components that cannot be rendered server-side will also fail, such as those with dependencies on window
, navigator
, document
, etc.
I'm not sure what the right approach is here, but I assume it should not be required to import your entire application simply to parse the router.
I hit this issue myself. Every component rendered by your
Router
will be imported indirectly when you import your routes file. Images, CSS and other files that require custom loaders will consequently fail to load in the node environment. Furthermore, components that cannot be rendered server-side will also fail, such as those with dependencies onwindow
,navigator
,document
, etc.I'm not sure what the right approach is here, but I assume it should not be required to import your entire application simply to parse the router.
I have also encountered the same problem. Have you found a solution? Looking forward to receiving your reply~
Hello, im having this issue when IM strying to generate sitemap, only happens with images on the project.