
React Native Nativewind Syntaxerror In Globals.css: Unrecognized Character '@'
Here is the solution for SyntaxError in globals.css: unrecognized character '@'" error.

If you are getting an error like "SyntaxError in globals.css: unrecognized character '@'" when you try to install Nativewind able to use TailwindCSS, changing metro.config.js
can help.
Here is how I solved the "SyntaxError in globals.css: unrecognized character '@'" error by changing the metro.config.js
// metro.config.js
const {getDefaultConfig} = require('@react-native/metro-config');
const {withNativeWind} = require('nativewind/metro');
const config = getDefaultConfig(__dirname);
module.exports = withNativeWind(config, {input: './app/globals.css'});
Make sure you start your app with yarn start --reset-cache
or npm start --reset-cache
0
0