How to import a global Stylus file in Vue.js

222 Views Asked by At

I want to use it for my global variables.

The fila I want to import just has this single line:

primary = red

But i can't import the file globally.

I tried in vue.config.js (_variables.styl is in the same folter, to avoid the route as an error factor)

module.exports = {
  css: {
    loaderOptions: {
      stylus: {
        import: "./_variables.styl",
      },
    },
  },
};
0

There are 0 best solutions below