4

I'm trying to use SCSS to style my elements in vue-native project. I just created a fresh project and ran it with Expo and it ran just fine. Then in my App.vue I tried to change <style> to <style scoped lang='scss'> and my app crashed.

I didn't find anything about SCSS in vue-native documentation. So I tried to follow the vue.js docs, I installed sass-loader with npm install -D sass-loader sass, installed fibers... and my app couldn't compile.

So does vue-native support working with SCSS at all? And if it does - how? What did I do wrong?

Igal
  • 5,833
  • 20
  • 74
  • 132
  • Hi @Igal, do you have any news about it ? – Jérémie Chazelle Apr 21 '21 at 17:25
  • @JérémieChazelle Hi Jérémie, unfortunately I don't. It appears vue-native doesn't support SCSS and it is not clear if it ever will. Quoting a recent post from a vue-native-core team member (https://github.com/GeekyAnts/vue-native-core/issues/284#issuecomment-782857810), "this project is not in active development". And considering that after all vue-native transpiles to react-native, personally I'd consider writing the app directly in react-native, even though writing styles as JS isn't very comfortable. – Igal Apr 22 '21 at 09:27

1 Answers1

0

Vue native is just a wrapper for React Native. React Native doesn't support CSS or SCSS as it has its own StyleSheet system as you are writing native code and styling. In response to your comment, vue native compiles css-like styles to react native styling, so you can still use vue-native instead of directly writing JS!

Dharman
  • 30,962
  • 25
  • 85
  • 135
Mawlicious
  • 36
  • 3