As a newcomer to react native and typescript, I am trying to use Tailwind CSS in my project by following the instructions on Nativewind for configuring tailwind.config.js. Here is the initial code snippet:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./App.tsx",
"./src/**/*.{js,jsx,ts,tsx}",
],
theme: {
extend: {},
},
plugins: [],
}
However, the CSS doesn't seem to apply to any files in the src folder. If I modify the configuration like this:
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./App.tsx",
// "./src/**/*.{js,jsx,ts,tsx}",
"./src/screens/Home.tsx",
"./src/screens/MainLayout.tsx",
"./src/screens/Profile.tsx",
"./src/screens/Search.tsx",
"./src/screens/SplashScreen.tsx",
],
theme: {
extend: {},
},
plugins: [],
}
then it works as expected. Can anyone point out what I might be doing wrong?