Replies: 2 comments 2 replies
-
I'm fairly certain this is because the bundler resolution mode doesn't provide the special handling to packages that it does for your own code. The package exports these sub-paths like this:
Since the path you are trying to import matches one of the There is a way to avoid it though, that first export for
If your build pipeline is doing tree-shaking this will still only include the pieces you are actually using, without having to specify the full path to each import. |
Beta Was this translation helpful? Give feedback.
-
@Mossop are you using TS? You could try changing to |
Beta Was this translation helpful? Give feedback.
-
I'm attempting to use the react components in a simple remix project. According to the docs I should be able to use this to import the icon component:
However this gives a TypeScript error:
Cannot find module '@shoelace-style/shoelace/dist/react/icon' or its corresponding type declarations
.I have found it works if I specify the full path:
Sort of annoying but not the end of the world but I wonder if there is a way to avoid this?
Beta Was this translation helpful? Give feedback.
All reactions