Skip to content

Conversation

@tyrauber
Copy link

Big fan or Mark Lawlor's work on Nativewind and expo-router. This PR merely drops in nativewind/examples/expo-router as a replacement for app-mobile. Closes #101.

@tyrauber tyrauber mentioned this pull request Oct 30, 2023
@kickbk
Copy link

kickbk commented Dec 15, 2023

Hey @tyrauber thanks a lot for this example!
Have you tried building the project? It fails complaining of a missing .cache/nativewind/global.css....
These files two css files are added to the cache folder after an initial build. For some reason, I was able to build successfully the second time with my fork of your fork, but not with yours. I must have changed something...
Regardless, do you have some thoughts on how we can handle this so a build will not fail, even the first time?

@tyrauber
Copy link
Author

Hey @kickbk, my apologies. You need the tailwindcss post-install hook. I'll rebase and update the repo.

"eas-build-post-install": "tailwindcss -i ./global.css -o ./node_modules/.cache/nativewind/global.css.native.css"

Also, Nativewind v4 has been released so you can update to [email protected].

post-install hook compiles css:
```
"eas-build-post-install": "tailwindcss -i ./global.css -o ./node_modules/.cache/nativewind/global.css.native.css"
```
@kickbk
Copy link

kickbk commented Dec 18, 2023

Thanks @tyrauber. I believe we need to generate a global.css.web.css and not global.css.native.css. I created a PR for it.

@tyrauber
Copy link
Author

Hey @kickbk, I think this issue - initial build failure, succeeding on subsequent builds - was resolved in 4.0.22. If you pull this branch and delete app/mobile/node_modules/.cache and run build it should no longer fail. I am able to build, run and export for web and mobile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants