You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 24, 2025. It is now read-only.
This error occurred only after switching from the regular react plugin to the react-swc plugin. The exact error is: Uncaught SyntaxError: The requested module '/src/types/devices.ts?t=1692279660309' does not provide an export named 'Device' (at AddDevicePopup.tsx:11:10)
In my scenario I have a React component that imports a type and a styled component with the same name:
AddDevicePopup.tsx
import{Device}from'@types/devices';import*asSfrom"./AddDevicePopup.styled";// includes S.Device
devices.ts
exporttypeDevice={};
AddDevicePopup.styled
exportconstDevice=styled.button;
It seems that even though the styled component Device is imported under the namespace S it somehow collides with the exported type Device and breaks my app. When renaming either the exported type or the styled component it works fine. So the workaround is easy but this seems like an issue that should resolved.