瀏覽代碼

fix(compiler-sfc): pass options directly to stylus (#3848)

zouhang 2 年之前
父節點
當前提交
d6446a6d40
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      packages/compiler-sfc/src/style/preprocessors.ts

+ 1 - 2
packages/compiler-sfc/src/style/preprocessors.ts

@@ -98,8 +98,7 @@ const less: StylePreprocessor = (source, map, options, load = require) => {
 const styl: StylePreprocessor = (source, map, options, load = require) => {
   const nodeStylus = load('stylus')
   try {
-    const ref = nodeStylus(source)
-    Object.keys(options).forEach(key => ref.set(key, options[key]))
+    const ref = nodeStylus(source, options)
     if (map) ref.set('sourcemap', { inline: false, comment: false })
 
     const result = ref.render()