vuejs / vue-component-compiler

Compile a single file Vue component into a CommonJS module.
MIT License
342 stars 52 forks source link

Support `data` option in preprocess style options to share common content as vars or imports #72

Closed tonimc closed 6 years ago

tonimc commented 6 years ago

Allow prepend a common style definition in the component which will compile, as you can do using a style-loader in webpack. For example, it's useful for scss be able to define a set of variables or imports and avoid writing in each component the same lines, as is supported with webpack on vue-loader https://vue-loader.vuejs.org/guide/pre-processors.html#sharing-global-variables