From 0526e5d7faa9ba69f76e7ff71fe96d93a4e99684 Mon Sep 17 00:00:00 2001 From: underfin <2218301630@qq.com> Date: Mon, 20 Jul 2020 02:17:31 +0800 Subject: [PATCH] fix(compiler-sfc): use `filename` from options when compile styl preprocessor (#1635) fix #https://github.com/vitejs/vite/issues/577 --- packages/compiler-sfc/src/stylePreprocessors.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-sfc/src/stylePreprocessors.ts b/packages/compiler-sfc/src/stylePreprocessors.ts index f0a09d751d7..2aa459a1781 100644 --- a/packages/compiler-sfc/src/stylePreprocessors.ts +++ b/packages/compiler-sfc/src/stylePreprocessors.ts @@ -110,7 +110,7 @@ const styl: StylePreprocessor = (source, map, options, load = require) => { // stylus output path is relative path const dependencies = getAbsolutePaths( ref.deps(), - path.dirname(options.fileName) + path.dirname(options.filename) ) if (map) { return {