Skip to content

Commit d6dc5b0

Browse files
committed
fix frontend build for windows
1 parent dd45025 commit d6dc5b0

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Diff for: Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
version=fake
22
ifeq ($(OS),Windows_NT)
33
bin=main.exe
4+
export=set
45
else
56
bin=main
7+
export=export
68
endif
79
# Example:
810
# make
@@ -40,6 +42,7 @@ endif
4042
dependencies:
4143
ifeq ($(bin),main.exe)
4244
@make prep-ci-local-windows
45+
yarn add react-scripts@latest
4346
else
4447
@make prep-ci-local
4548
endif
@@ -48,7 +51,7 @@ endif
4851

4952
.PHONY: build-frontend
5053
build-frontend:
51-
cd web && yarn build && cd ..
54+
cd web && $(export) BUILD_PATH=../cmd/build && CI=false yarn build && cd ..
5255

5356
.PHONY: serve-backend
5457
serve-backend:

Diff for: web/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"scripts": {
3030
"start": "react-scripts start",
31-
"build": "BUILD_PATH='../cmd/build' react-scripts build",
31+
"build": "react-scripts build",
3232
"test": "react-scripts test",
3333
"eject": "react-scripts eject"
3434
},
@@ -50,4 +50,4 @@
5050
"last 1 safari version"
5151
]
5252
}
53-
}
53+
}

0 commit comments

Comments
 (0)