]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(compiler-sfc): pass options directly to stylus (#3848)
authorzouhang <zouhangsweet@gmail.com>
Mon, 10 Jul 2023 09:52:56 +0000 (17:52 +0800)
committerGitHub <noreply@github.com>
Mon, 10 Jul 2023 09:52:56 +0000 (17:52 +0800)
packages/compiler-sfc/src/style/preprocessors.ts

index 96c1153f05d1f3226cee711e320fee44e1c32448..9b3610501c77981be12a1a35fdf7e6e17a59fda1 100644 (file)
@@ -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()