From 1565fd1e62af5bfd5f005af834d4eb4880bbac4b Mon Sep 17 00:00:00 2001 From: zouhang Date: Sat, 29 May 2021 20:42:42 +0800 Subject: [PATCH] fix(compiler-sfc): pass options directly to stylus --- packages/compiler-sfc/src/style/preprocessors.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/compiler-sfc/src/style/preprocessors.ts b/packages/compiler-sfc/src/style/preprocessors.ts index 96c1153f05d..9b3610501c7 100644 --- a/packages/compiler-sfc/src/style/preprocessors.ts +++ b/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()