kristerkari / react-native-sass-transformer

Use Sass to style your React Native apps.
MIT License
219 stars 19 forks source link

Expojs and style is a file .scss not an object #57

Open helveden opened 1 year ago

helveden commented 1 year ago

Hello, I have set up the scripts to use the scss in an expojs application. I test in WEB mode. For the moment I see a file that is generated:

import styles from "../../../App.scss"; console.log(styles)

/static/media/App.d7a4b96b.scss

I can't find this file physically in the directories. And styles are also not taken into account.

How can I solve my problem please?

Cordially

  "dependencies": {
    "@expo/vector-icons": "^13.0.0",
    "@expo/webpack-config": "^0.17.0",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/drawer": "^6.5.0",
    "@react-navigation/material-bottom-tabs": "^6.2.4",
    "@react-navigation/material-top-tabs": "^6.2.4",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/native-stack": "^6.9.0",
    "axios": "^0.27.2",
    "babel-plugin-react-native-classname-to-style": "^1.2.2",
    "babel-plugin-react-native-platform-specific-extensions": "^1.1.1",
    "expo": "~46.0.13",
    "expo-status-bar": "~1.4.0",
    "metro-react-native-babel-transformer": "^0.73.2",
    "node-sass": "^7.0.3",
    "react": "18.0.0",
    "react-dom": "18.0.0",
    "react-native": "0.69.6",
    "react-native-gesture-handler": "~2.5.0",
    "react-native-pager-view": "5.4.24",
    "react-native-paper": "^4.12.5",
    "react-native-reanimated": "~2.9.1",
    "react-native-safe-area-context": "4.3.1",
    "react-native-screens": "~3.15.0",
    "react-native-tab-view": "^3.2.1",
    "react-native-vector-icons": "^9.2.0",
    "react-native-web": "~0.18.7",
    "react-navigation": "^4.4.4"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "react-native-sass-transformer": "^2.0.0",
    "sass": "^1.55.0"
  },
gothaw commented 1 year ago

I'm having the same issue. I followed the instructions in readme to set up the project but I can't figure it out what's wrong.

nikshirobokov commented 1 year ago

I'm having the same issue. I followed the instructions in readme to set up the project but I can't figure it out what's wrong.

Yeah, Me too.

nikshirobokov commented 1 year ago

@helveden Might, have you solved this issue yourself? It would be interesting to know if you managed to configure it in a different way.

nikshirobokov commented 1 year ago

@helveden @gothaw I found the cause of this problem.

Try to use the solution I suggest here: https://github.com/kristerkari/react-native-sass-transformer/issues/32#issuecomment-1385221292