When tagging a component, Bit builds the component first then tags it.
If for example, a component is at 0.0.1, during the build process, the compiler generates a package.json file with the version 0.0.1.
The problem is that immediately after the build, the component is tagged to 0.0.2, which creates an inconsistency between the two.
This was the reason for https://github.com/teambit/bit/issues/2260 issue.
Steps to Reproduce
create a ts component, tag as 0.0.1, export,
import to a new workspace.
change the component and tag.
Notice the difference between the package.json files.
Expected Behavior
Not sure.
Why is there package.json in the dists directory in the first place?
Describe the bug
When tagging a component, Bit builds the component first then tags it. If for example, a component is at 0.0.1, during the build process, the compiler generates a package.json file with the version 0.0.1. The problem is that immediately after the build, the component is tagged to 0.0.2, which creates an inconsistency between the two. This was the reason for https://github.com/teambit/bit/issues/2260 issue.
Steps to Reproduce
Expected Behavior
Not sure. Why is there package.json in the dists directory in the first place?
Specifications
Additional context
Add any other context about the problem here.