Tags: Yumwey/bit
Tags
fix error Cannot find module "babel-preset-jest" when bit is installe… …d globally (teambit#3328) Because the Jest transformer doesn't require the package directly but uses `require.resolve`, it needs to be specified in the workspace.json/component.json file. Currently, `babel-preset-jest` is configured in the global workspace.jsonc and not specifically on the react aspect. As a result, locally, it finds the package, but globally, it does not. In this PR, all `require.resolve` were changed to `require`, so then Bit dependency resolution would find them and automatically add them as dependencies.
PreviousNext