Closed timonmasberg closed 2 years ago
Actually, it seems to be the build order, is there a way to explicitly set it?
Actually, it seems to be the build order, is there a way to explicitly set it?
Build order gets determined by dependencies
or devDependencies
in package.json. If you have any issues with the build order based on these dependencies, I think it will help to provide a repo for testing.
Yep that sounds like an issue with the build order.
There's an example in this repo you can reference. To define the build order declare your workspace dependencies as if they're an npm module, but instead of a version you can use "workspace:*"
.
Describe the bug When referencing a workspace that uses the package.json exports property, and I run
yarn build
(tsc
), the imports cannot be resolved:Cannot find module 'modulewithexportfields' or its corresponding type declarations.
When running tsc in the project, everything works as expectedTo Reproduce Steps to reproduce the behavior:
Expected behavior Everything should work the same way as you run the build command in the packages folder.