the way to solve this issue with babel is to use topLevelImportPaths as mentioned above but with SWC the issue still exists
Broken - import {styled} from "./path/to/file"
Working - import styled from "styled-components"
using the '@packages/webmobile-sc-components' will add the filename to the styles which were imported from this package only, but I want a solution that works for all packages/apps in the monorepo.
My config is the following:
The problem occurs when styled-components reexport like here https://github.com/styled-components/babel-plugin-styled-components/issues/261
the way to solve this issue with babel is to use
topLevelImportPaths
as mentioned above but with SWC the issue still existsBroken -
import {styled} from "./path/to/file"
Working -import styled from "styled-components"
using the
'@packages/webmobile-sc-components'
will add the filename to the styles which were imported from this package only, but I want a solution that works for all packages/apps in the monorepo.is there any way to fix that?