瀏覽代碼

fix(compiler-sfc): use `filename` from options when compile styl preprocessor (#1635)

fix #https://github.com/vitejs/vite/issues/577
underfin 5 年之前
父節點
當前提交
0526e5d7fa
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/compiler-sfc/src/stylePreprocessors.ts

+ 1 - 1
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 {