Skip to content

Commit

Permalink
use filename instead of path
Browse files Browse the repository at this point in the history
fixes: #1
Signed-off-by: Erik Jan de Wit <[email protected]>
  • Loading branch information
edewit committed Mar 12, 2024
1 parent 104ddb1 commit 61e372b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions esbuild_scss.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,14 @@ func compileSass(inputPath, outputPath string, build api.PluginBuild) (string, e
}
bin := filepath.Dir(current)
pack := filepath.Dir(bin)
dartSass := filepath.Join(filepath.Dir(pack), "dart-sass")
os.Setenv("PATH", os.Getenv("PATH")+string(os.PathListSeparator)+dartSass)
dartSass := filepath.Join(filepath.Dir(pack), "dart-sass", "sass")

sourceSyntax := findSourceSyntax(inputPath)

// Create a Dart Sass compiler
compiler, err := godartsass.Start(godartsass.Options{})
compiler, err := godartsass.Start(godartsass.Options{
DartSassEmbeddedFilename: dartSass,
})
if err != nil {
return "", err
}
Expand Down

0 comments on commit 61e372b

Please sign in to comment.