Skip to content

Commit

Permalink
fix: sass plugin import deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Aylur committed Sep 27, 2024
1 parent b394551 commit ff3740e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/esbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ var sassPlugin api.Plugin = api.Plugin{
}

sass := Exec("sass", "--stdin", "-I", filepath.Dir(args.Path))
// if cwd is the path of the currently loaded file sass warns about it
// in order to avoid the deprecation warning we explicitly set it to something else
sass.Dir = "/"
sass.Stderr = os.Stderr
stdin, _ := sass.StdinPipe()
stdin.Write(data)
Expand Down

0 comments on commit ff3740e

Please sign in to comment.