This fixes a use case when you have a component that is compiled to esm with a type:module in its package.json.
and its env is not part of the workspace.
Before this fix, the env of the component was not loaded properly resulting in missing type: modules in the package.json.
If that component is used by another env which is part of the workspace, it will always be loaded during bit component loading. but since the type: module is missing, the component won't be loaded correctly, resulting in the env not loaded.
This means the workspace is in a deadlock, and the only way to unblock it from any command, is to manually go to the relevant components and add the type: module to the package.json
Proposed Changes
type:module
in itspackage.json
. and its env is not part of the workspace. Before this fix, the env of the component was not loaded properly resulting in missingtype: modules
in thepackage.json
. If that component is used by another env which is part of the workspace, it will always be loaded during bit component loading. but since the type: module is missing, the component won't be loaded correctly, resulting in the env not loaded. This means the workspace is in a deadlock, and the only way to unblock it from any command, is to manually go to the relevant components and add thetype: module
to thepackage.json