Webpack loader problem when importing React component in yarn workspaces

Viewed 117

I am setting up a next and expo project in a monorepo with yarn workspaces. I always get the following error when trying to run a page with a component exported from another yarn workspace package:

You may need an appropriate loader to handle this file type, currently no loaders 
are configured to process this file. See https://webpack.js.org/concepts#loaders

| export const ExampleButton = () => (
>   <TouchableOpacity>
|     <Text>Press to test</Text>
|   </TouchableOpacity>

When importing the same component from a file inside the app, it works. It only brakes when importing from another yarn workspace package. Are there any high level reasons why this would happen? I'm happy to provide more info if required.

0 Answers
Related