Skip to content

Commit

Permalink
fix frontend build for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
derhnyel committed Nov 13, 2022
1 parent dd45025 commit d6dc5b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
version=fake
ifeq ($(OS),Windows_NT)
bin=main.exe
export=set
else
bin=main
export=export
endif
# Example:
# make
Expand Down Expand Up @@ -40,6 +42,7 @@ endif
dependencies:
ifeq ($(bin),main.exe)
@make prep-ci-local-windows
yarn add react-scripts@latest
else
@make prep-ci-local
endif
Expand All @@ -48,7 +51,7 @@ endif

.PHONY: build-frontend
build-frontend:
cd web && yarn build && cd ..
cd web && $(export) BUILD_PATH=../cmd/build && CI=false yarn build && cd ..

.PHONY: serve-backend
serve-backend:
Expand Down
4 changes: 2 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"scripts": {
"start": "react-scripts start",
"build": "BUILD_PATH='../cmd/build' react-scripts build",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand All @@ -50,4 +50,4 @@
"last 1 safari version"
]
}
}
}

0 comments on commit d6dc5b0

Please sign in to comment.