Closed sadik-malik closed 1 year ago
If the file is only used to re-exports variables (not recommended when using Vite) it should be named index.ts
When types are not exported, there is no warning, and changing the file to index.ts is like turning off the plugin.
Since re-exports are not advised with Vite, it appears that I have to remove all of them.
I export all of the components, including the types, using the index.tsx file that is located in that folder.
When I export the component in the following way eslint-plugin-react-refresh is giving me warning Fast refresh only works when a file only exports components. Use a new file to share constants or functions between components.
There is no warning, though, when I write it in a different way like I do below.
In my opinion, the plugin shouldn't issue any alerts if the types are exported.