vuejs / component-compiler-utils

Lower level utilities for compiling Vue single file components
321 stars 75 forks source link

Support `data` option in sass to sharing global variables #21

Closed tonimc closed 6 years ago

tonimc commented 6 years ago

As you can do in vue-loader allow using data options to avoid write in each component a set of sass variables https://vue-loader.vuejs.org/guide/pre-processors.html#sharing-global-variables

In this moment data options don't work because is used by scss.render function to provide to compiler the scss code https://github.com/vuejs/component-compiler-utils/blob/master/lib/styleProcessors/index.ts#L26

tonimc commented 6 years ago

Digging more in-depth I see that this is used by vue-loader and in that case, I mean that is sass-loader which use data option previous to get this.

I need it for rollup-plugin-vue so I will take a look to tried to fix it from it.

Sorry for the noise.