-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace tailwind-rn with twrnc, enable parentheses in styles
- Loading branch information
Showing
13 changed files
with
595 additions
and
828 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
packages/react-native-tailwind.macro/jest-twrnc-resolver.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* Currently, jest doesn't support the `exports` fields in package.json that twrnc relies on. | ||
* If the required module is twrnc/create, resolve the actual cjs path. | ||
* | ||
* Note: This is not ideal, but works for now until `exports` is supported in Jest 28. | ||
*/ | ||
module.exports = (request, options) => { | ||
if (request === "twrnc/create") | ||
return options.defaultResolver("twrnc/dist/cjs/create.js", options) | ||
else return options.defaultResolver(request, options) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.