From cfe0b9da19639f85eb616e7ee2f251960b8d40c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franc=CC=A7ois=20Risoud?= Date: Sun, 4 Apr 2021 18:44:03 +0200 Subject: [PATCH] fix(css): properly pass options to stylus compiler --- packages/vite/src/node/plugins/css.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/vite/src/node/plugins/css.ts b/packages/vite/src/node/plugins/css.ts index e3a5c2a2f093fe..43bf22792a9020 100644 --- a/packages/vite/src/node/plugins/css.ts +++ b/packages/vite/src/node/plugins/css.ts @@ -1105,9 +1105,8 @@ function createViteLessPlugin( const styl: StylePreprocessor = (source, root, options) => { const nodeStylus = loadPreprocessor(PreprocessLang.stylus, root) 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 }) const result = ref.render()