0

I've set up a sample NativeScript Vue project as per the quick start guide.

Additionally, I installed the Stylus plugin with tns install stylus.

However, it doesn't seem to recognise the Stylus code in the Vue single-file component:

file:///app/bundle.js:49:209: JS ERROR Error: Module parse failed: Unexpected character '#' (40:21)
You may need an appropriate loader to handle this file type.
| 
| ActionBar
>     background-color #53ba82
|     color #ffffff

How can I make both Vue and Stylus play nice with NativeScript?

Emphram Stavanger
  • 4,158
  • 9
  • 35
  • 63
  • I don't think the plugin works with Vue, I think the plugin was written even before {N} did onboard Vue support. You may have to use stylus loader for webpack. – Manoj Sep 22 '19 at 07:31
  • I understand that the plugin may be useless, and I'm not really married to it. However, when I added (what I think is sensible) configuration to load Stylus in Webpack, it would still complain about the styles in the Vue component files, and I'm not sure how to address that. Do you know what kind of configuration would work here? – Emphram Stavanger Sep 22 '19 at 09:48

0 Answers0