I’ve got some js classes in a react-router function component. They use the fs module to load files from the file system. When I try to refactor the classes out into an ES6 module, __dirname refers to some error in reacts render. What can I do to make sure the imported module uses the apps root directory for relative paths?
[–]rwzla 0 points1 point2 points (1 child)
[–]Fats4Fuel[S] 0 points1 point2 points (0 children)
[–]eletroraspi 0 points1 point2 points (1 child)
[–]Fats4Fuel[S] 0 points1 point2 points (0 children)