From 61e372b2e2cbc17e0932157466d9d2e8005c9098 Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Tue, 12 Mar 2024 15:21:35 +0100 Subject: [PATCH] use filename instead of path fixes: #1 Signed-off-by: Erik Jan de Wit --- esbuild_scss.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/esbuild_scss.go b/esbuild_scss.go index 68269a5..df121fe 100644 --- a/esbuild_scss.go +++ b/esbuild_scss.go @@ -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 }