Jelajahi Sumber

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

fix #https://github.com/vitejs/vite/issues/577
underfin 5 tahun lalu
induk
melakukan
0526e5d7fa
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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 {