-
Notifications
You must be signed in to change notification settings - Fork 24
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
Bump frontend deps #7813
Bump frontend deps #7813
Conversation
e5f56d2
to
bd00b1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! the changes look very good. only left some smaller comments. will test once these are addressed.
webpack.config.js
Outdated
@@ -83,18 +77,21 @@ module.exports = function (env = {}) { | |||
], | |||
}, | |||
{ | |||
test: /\.tsx?$/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you split tsx? into ts and tsx? the config looks the almost same or is there a difference because of the loader
attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also a legacy from the debugging problems. Should be resolved now :)
@@ -166,6 +169,11 @@ module.exports = function (env = {}) { | |||
}, | |||
optimization: { | |||
minimize: env.production, | |||
minimizer: [ | |||
new EsbuildPlugin({ | |||
target: buildTarget, // Syntax to transpile to (see options below for possible values) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
target: buildTarget, // Syntax to transpile to (see options below for possible values) | |
target: buildTarget, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you sanity check the size of the js modules in the devtools (master vs this branch)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This branch:
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
8c3b61b77fee2ba4b6db.ttf (274 KiB)
4a3eef3e0a61b7eb3eda.ttf (269 KiB)
2f517e09eb2ca6650ff5.svg (730 KiB)
7a8b4f130182d19a2d7c.svg (897 KiB)
main.js (1.49 MiB)
vendors~onnx.js (529 KiB)
vendors~main.js (4.7 MiB)
ort-training-wasm-simd.wasm (10.7 MiB)
ort-wasm-simd-threaded.jsep.wasm (18.6 MiB)
ort-wasm-simd-threaded.wasm (10.2 MiB)
ort-wasm-simd.jsep.wasm (16.6 MiB)
ort-wasm-simd.wasm (10.1 MiB)
ort-wasm-threaded.wasm (9.36 MiB)
ort-wasm.wasm (9.28 MiB)
models/vit_l_0b3195_decoder_quantized.onnx (8.34 MiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
main (6.36 MiB)
vendors~main.css
vendors~main.js
main.css
main.js
On the master:
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
4a3eef3e0a61b7eb3eda.ttf (269 KiB)
8c3b61b77fee2ba4b6db.ttf (274 KiB)
2f517e09eb2ca6650ff5.svg (730 KiB)
7a8b4f130182d19a2d7c.svg (897 KiB)
main.js (1.53 MiB)
vendors~onnx.js (547 KiB)
vendors~main.js (4.76 MiB)
models/vit_l_0b3195_decoder_quantized.onnx (8.34 MiB)
ort-wasm-simd-threaded.wasm (9.5 MiB)
ort-wasm-simd.wasm (9.55 MiB)
ort-wasm-threaded.wasm (8.73 MiB)
ort-wasm.wasm (8.8 MiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
main (6.45 MiB)
vendors~main.css
vendors~main.js
main.css
main.js
=> main size reduced :D
so it should be fine and it is faster than terser 🚀
loader: () => Promise<{ default: React.ComponentType<Props> }>, | ||
) { | ||
const InternalComponent = React.lazy(loader) as any; | ||
return function AsyncComponent(_props: Props) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the _
prefix? since the var is used, it can simply be props
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, sorry. I had a lot of TS problems and this is a legacy of the debugging process 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your feedback and also checking for potential upgrades of other packages. I applied all of it :)
loader: () => Promise<{ default: React.ComponentType<Props> }>, | ||
) { | ||
const InternalComponent = React.lazy(loader) as any; | ||
return function AsyncComponent(_props: Props) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, sorry. I had a lot of TS problems and this is a legacy of the debugging process 🙈
webpack.config.js
Outdated
@@ -83,18 +77,21 @@ module.exports = function (env = {}) { | |||
], | |||
}, | |||
{ | |||
test: /\.tsx?$/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also a legacy from the debugging problems. Should be resolved now :)
@@ -166,6 +169,11 @@ module.exports = function (env = {}) { | |||
}, | |||
optimization: { | |||
minimize: env.production, | |||
minimizer: [ | |||
new EsbuildPlugin({ | |||
target: buildTarget, // Syntax to transpile to (see options below for possible values) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This branch:
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
8c3b61b77fee2ba4b6db.ttf (274 KiB)
4a3eef3e0a61b7eb3eda.ttf (269 KiB)
2f517e09eb2ca6650ff5.svg (730 KiB)
7a8b4f130182d19a2d7c.svg (897 KiB)
main.js (1.49 MiB)
vendors~onnx.js (529 KiB)
vendors~main.js (4.7 MiB)
ort-training-wasm-simd.wasm (10.7 MiB)
ort-wasm-simd-threaded.jsep.wasm (18.6 MiB)
ort-wasm-simd-threaded.wasm (10.2 MiB)
ort-wasm-simd.jsep.wasm (16.6 MiB)
ort-wasm-simd.wasm (10.1 MiB)
ort-wasm-threaded.wasm (9.36 MiB)
ort-wasm.wasm (9.28 MiB)
models/vit_l_0b3195_decoder_quantized.onnx (8.34 MiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
main (6.36 MiB)
vendors~main.css
vendors~main.js
main.css
main.js
On the master:
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
This can impact web performance.
Assets:
4a3eef3e0a61b7eb3eda.ttf (269 KiB)
8c3b61b77fee2ba4b6db.ttf (274 KiB)
2f517e09eb2ca6650ff5.svg (730 KiB)
7a8b4f130182d19a2d7c.svg (897 KiB)
main.js (1.53 MiB)
vendors~onnx.js (547 KiB)
vendors~main.js (4.76 MiB)
models/vit_l_0b3195_decoder_quantized.onnx (8.34 MiB)
ort-wasm-simd-threaded.wasm (9.5 MiB)
ort-wasm-simd.wasm (9.55 MiB)
ort-wasm-threaded.wasm (8.73 MiB)
ort-wasm.wasm (8.8 MiB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
Entrypoints:
main (6.45 MiB)
vendors~main.css
vendors~main.js
main.css
main.js
=> main size reduced :D
so it should be fine and it is faster than terser 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome 🥇
This PR updates some outdated frontend dependencies and replaces the markdown library with react-markdown. Moreover, prop types, esbuild loader, protobuffjs, and onnx web runtime are updated.
In order to fix the frontend tests, the new markdown library needs to be loaded lazily. Thus, I created the
markdown_adapter.tsx
file.URL of deployed dev instance (used for testing):
Steps to test:
TODOs:
options={{ html: false, breaks: true, linkify: true, }
Issues:
(Please delete unneeded items, merge only when none are left open)
[ ] Updated changelogI'd say it is not needed as this is not user-facing.