Skip to content

Commit

Permalink
export node options at top of each makefile that requires webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
shlokamin committed Oct 23, 2023
1 parent 390af5c commit d7448af
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app-shell/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,5 @@ dev-app-update.yml:
dev: export NODE_ENV := development
dev: export OPENTRONS_PROJECT := $(OPENTRONS_PROJECT)
dev: clean-dev-autoupdate ./dev-app-update.yml
NODE_OPTIONS=--openssl-legacy-provider webpack
webpack
$(electron)
5 changes: 4 additions & 1 deletion app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ shell_dir := ../app-shell
shell_odd_dir := ../app-shell-odd
discovery_client_dir := ../discovery-client

# override webpack's default hashing algorithm for node 18: https://github.com/webpack/webpack/issues/14532
export NODE_OPTIONS := --openssl-legacy-provider

# standard targets
#####################################################################

Expand Down Expand Up @@ -61,7 +64,7 @@ dev-odd:
.PHONY: dev-server
dev-server: export OPENTRONS_PROJECT := $(OPENTRONS_PROJECT)
dev-server:
NODE_OPTIONS=--openssl-legacy-provider webpack-dev-server --hot
webpack-dev-server --hot

.PHONY: dev-shell
dev-shell:
Expand Down
5 changes: 4 additions & 1 deletion labware-library/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ SHELL := bash
# add node_modules/.bin to PATH
PATH := $(shell cd .. && yarn bin):$(PATH)

# override webpack's default hashing algorithm for node 18: https://github.com/webpack/webpack/issues/14532
export NODE_OPTIONS := --openssl-legacy-provider

.PHONY: all
all: clean dist

Expand Down Expand Up @@ -34,6 +37,6 @@ serve: all
# end to end tests
.PHONY: test-e2e
test-e2e:
NODE_OPTIONS=--openssl-legacy-provider concurrently --no-color --kill-others --success first --names "labware-library-server,labware-library-tests" \
concurrently --no-color --kill-others --success first --names "labware-library-server,labware-library-tests" \
"$(MAKE) dev CYPRESS=1 GTM_ID=''" \
"wait-on http://localhost:8080/ && cypress run --browser chrome --headless --record false"
5 changes: 4 additions & 1 deletion protocol-designer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ SHELL := bash
# add node_modules/.bin to PATH
PATH := $(shell cd .. && yarn bin):$(PATH)

# override webpack's default hashing algorithm for node 18: https://github.com/webpack/webpack/issues/14532
export NODE_OPTIONS := --openssl-legacy-provider

benchmark_output := $(shell node -e 'console.log(new Date());')

# standard targets
Expand Down Expand Up @@ -54,6 +57,6 @@ serve: all
# end to end tests
.PHONY: test-e2e
test-e2e:
NODE_OPTIONS=--openssl-legacy-provider concurrently --no-color --kill-others --success first --names "protocol-designer-server,protocol-designer-tests" \
concurrently --no-color --kill-others --success first --names "protocol-designer-server,protocol-designer-tests" \
"$(MAKE) dev CYPRESS=1" \
"wait-on http://localhost:8080/ && cypress run --browser chrome --headless --record false"

0 comments on commit d7448af

Please sign in to comment.