From: zouhang Date: Mon, 10 Jul 2023 09:52:56 +0000 (+0800) Subject: fix(compiler-sfc): pass options directly to stylus (#3848) X-Git-Tag: v3.3.5~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d6446a6d40774b79045a9ddba7b5fd5201d51450;p=thirdparty%2Fvuejs%2Fcore.git fix(compiler-sfc): pass options directly to stylus (#3848) --- diff --git a/packages/compiler-sfc/src/style/preprocessors.ts b/packages/compiler-sfc/src/style/preprocessors.ts index 96c1153f05..9b3610501c 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()