Open elclanrs opened 8 years ago
How can I import stylus plugins for all components? I understand I can do the following in each component:
<style lang="stylus" scoped> @import "nib" @import "jeet" // ... </style>
But is there a way to import nib and jeet for all components? I tried in vue.config.js:
vue.config.js
var nib = require('nib') var jeet = require('jeet') module.exports = { stylus: { use: [nib(), jeet()] import: ['nib', 'jeet'] } }
While use works (I can use the plugins importing them manually from each component), the imports don't work and I can't use any of the features provided by those plugins.
use
What am I missing?
Maybe you now it already but you added "scoped" attribute to limit CSS to the component only
How can I import stylus plugins for all components? I understand I can do the following in each component:
But is there a way to import nib and jeet for all components? I tried in
vue.config.js
:While
use
works (I can use the plugins importing them manually from each component), the imports don't work and I can't use any of the features provided by those plugins.What am I missing?