Skip to content

Commit

Permalink
fixed windows build
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Jan de Wit <[email protected]>
  • Loading branch information
edewit committed Jan 31, 2024
1 parent 1d23c24 commit 104ddb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ download-win:
mv dart-sass $(BUILDDIR)

build-win32:
CGO_ENABLED=0 GOOS="$(GOOS)" GOARCH="$(GOARCH)" go build $(GO_FLAGS) -o "build/$(BUILDDIR)/package/esbuild.exe" ./esbuild_scss.go
@$(MAKE) --no-print-directory GOOS="$(GOOS)" GOARCH="$(ARCH)" BUILDDIR="build/$(BUILDDIR)/package" download-win
tar -czf "build/esbuild-$(BUILDDIR)-$(VERSION).tgz" --directory "build/$(BUILDDIR)" package
CGO_ENABLED=0 GOOS="$(GOOS)" GOARCH="$(GOARCH)" go build $(GO_FLAGS) -o "build/$(BUILDDIR)/package/bin/esbuild.exe" ./esbuild_scss.go
@$(MAKE) --no-print-directory GOOS="$(GOOS)" GOARCH="$(ARCH)" BUILDDIR="build/$(BUILDDIR)" download-win
tar -czf "build/esbuild-$(BUILDDIR)-$(VERSION).tgz" --directory "build/$(BUILDDIR)" package dart-sass

platform-win32-x64:
@$(MAKE) --no-print-directory GOOS=windows GOARCH=amd64 ARCH=x64 BUILDDIR=win32-x64 build-win32
Expand Down
2 changes: 1 addition & 1 deletion esbuild_scss.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ 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")+":"+dartSass)
os.Setenv("PATH", os.Getenv("PATH")+string(os.PathListSeparator)+dartSass)

sourceSyntax := findSourceSyntax(inputPath)

Expand Down

0 comments on commit 104ddb1

Please sign in to comment.