mirror of https://github.com/vuejs/core.git
fix(compiler-sfc): pass options directly to stylus (#3848)
This commit is contained in:
parent
924069891e
commit
d6446a6d40
|
|
@ -98,8 +98,7 @@ const less: StylePreprocessor = (source, map, options, load = require) => {
|
||||||
const styl: StylePreprocessor = (source, map, options, load = require) => {
|
const styl: StylePreprocessor = (source, map, options, load = require) => {
|
||||||
const nodeStylus = load('stylus')
|
const nodeStylus = load('stylus')
|
||||||
try {
|
try {
|
||||||
const ref = nodeStylus(source)
|
const ref = nodeStylus(source, options)
|
||||||
Object.keys(options).forEach(key => ref.set(key, options[key]))
|
|
||||||
if (map) ref.set('sourcemap', { inline: false, comment: false })
|
if (map) ref.set('sourcemap', { inline: false, comment: false })
|
||||||
|
|
||||||
const result = ref.render()
|
const result = ref.render()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue