Hello everyone, I'm trying to use stylus-loader
just like we do with sass-loader
, however I do not get the same result:
With sass-loader
it runs fine, but when trying to use the stylus-loader
an error is thrown:
Module build failed: Error: Can not find module 'stylus'
I tried to just install: npm i --save-dev stylus-loader
, just like I did with sass .. I have not tried any configuration in nuxt.config.js
since I imagine it should already be "native" since version 1.0
How can I use stylus in .vue components?
Hi,
add as dependency (or dev dependency) this packages:
yarn add stylus stylus-loader # or use npm install
In package.json
"stylus": "^0.54.5",
"stylus-loader": "^3.0.1"
Perfect @EllenFawkes, I was forgetting to install the stylus
as a dependency.
Thanks for the quick response!
I had some problems with webpack 4 (nuxt-edge). But re-installing as @purrplingcat said, made it. Since 26th Feb is: [email protected]
It does not work for me in nuxt-edge. Is this the correct way?
@gianniskarmas I had to install the stylus loader manually as I was saying. Nuxt-edge is not stable yet. Can't wait to use it in production. But we have to be patient at the moment hehe. ;)
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi,
add as dependency (or dev dependency) this packages:
In package.json