Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Replace CRACO Build/Serve with Vite #5926

Merged
merged 27 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
25ef9a6
feat: made first config into compiling work
thiagodallacqua-hpe Feb 2, 2023
1bd05c4
get server and build working locally
ashtonG Feb 3, 2023
d78d3e7
add csp support
ashtonG Feb 3, 2023
9400322
remove old index
ashtonG Feb 3, 2023
94a7189
check types on build
ashtonG Feb 3, 2023
d81019f
prevent out of memory error?
ashtonG Feb 3, 2023
4df1c87
fix memory leak
ashtonG Feb 3, 2023
8a1cbc3
give node more memory
ashtonG Feb 3, 2023
e2335c1
try applying it here for netlify?
ashtonG Feb 3, 2023
f6d10b6
ensure csphtml plugin runs after all other plugins
ashtonG Feb 6, 2023
2d89f55
default base url to root?
ashtonG Feb 6, 2023
5f16c61
undo public url change, record public url
ashtonG Feb 6, 2023
d76e78f
drop sourcemap from non-prod builds
ashtonG Feb 6, 2023
124948a
remove csp comment
ashtonG Feb 6, 2023
3b6acf4
work around public_url weirdness
ashtonG Feb 6, 2023
c40a41e
swap react plugin for swc/regen package json
ashtonG Feb 6, 2023
d557cee
try removing second node options build for netlify
ashtonG Feb 6, 2023
0d76727
temp. restore of vendor/notebook.js
ashtonG Feb 6, 2023
824c206
remove old notebook.js
ashtonG Feb 6, 2023
0c1aaa2
update react plugin import
ashtonG Feb 6, 2023
5e318b5
re-add heap size hack for netlify
ashtonG Feb 6, 2023
15a1bd3
use port 3000
ashtonG Feb 7, 2023
1df9e36
update eslintignore
ashtonG Feb 8, 2023
53096d7
add tsc checking in vite
ashtonG Feb 8, 2023
0d9fd8b
remove extraneous spaces from interactive url
ashtonG Feb 8, 2023
1443ca1
remove react-scripts type
ashtonG Feb 8, 2023
b65ed36
clean up env types
ashtonG Feb 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion webui/react/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
src/serviceWorker.ts
src/services/api-ts-sdk/
src/vendor/notebook.js
src/vendor/notebook/notebook.js
!.eslintrc.js
!.stylelintrc.js
node_modules
3 changes: 2 additions & 1 deletion webui/react/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Set the path React is going to be served from eg ./ for serving from root.
export PUBLIC_URL ?= /det
export ESLINT_NO_DEV_ERRORS ?= true
export NODE_OPTIONS=--max-old-space-size=6144
source_files := $(shell find src public -type f)

.PHONY: default
Expand All @@ -22,7 +23,7 @@ get-deps: check-requirements node_modules/done.stamp
.PHONY: build
build: check-requirements build/done.stamp

build/done.stamp: $(source_files) node_modules/done.stamp tsconfig.json craco.config.js jest.config.js
build/done.stamp: $(source_files) node_modules/done.stamp tsconfig.json craco.config.js jest.config.js vite.config.ts
hkang1 marked this conversation as resolved.
Show resolved Hide resolved
npm run build
touch $@

Expand Down
5 changes: 2 additions & 3 deletions webui/react/public/index.html → webui/react/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@

<head>
<meta charset="utf-8" />
<base href="%PUBLIC_URL%">
<meta name="theme-color" content="#000000" />
<meta name="description" content="Determined Deep Learning Training Platform" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, minimal-ui" />
<meta http-equiv="Content-Security-Policy" content="%%CSP_CONTENT%%"/>
<!--
Even though react-helmet-async is dynamically setting favicons,
it is still included here in order for Safari to at least show one.
https://stackoverflow.com/questions/63781987/cant-change-favicon-with-javascript-in-safari
-->
<link rel="shortcut icon" type="image/x-icon" href="%PUBLIC_URL%/determined/favicon.ico" />
<link rel="shortcut icon" type="image/x-icon" href="/determined/favicon.ico" />
<title>Determined</title>
</head>

Expand All @@ -27,6 +25,7 @@
}
}();
</script>
<script type="module" src="/src/index.tsx"></script>
</body>

</html>
Loading