fix(medusa-react): Fix production.min.js causing invalid hook usage error in CJS environments (#3144)
This commit is contained in:
@@ -11,4 +11,9 @@ module.exports = {
|
||||
},
|
||||
setupFilesAfterEnv: ["./jest.setup.js"],
|
||||
testEnvironment: "jsdom",
|
||||
moduleNameMapper: {
|
||||
// Force module uuid to resolve with the CJS entry point, because Jest does not support package.json.exports. See https://github.com/uuidjs/uuid/issues/451
|
||||
// Issue is fixed in newer versions of UUID, but since it's a transitive dependency, we need to force it here.
|
||||
"^uuid$": "uuid",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user