gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
30.69k stars 2.28k forks source link

[Custom Components] Option for build target #8416

Closed radames closed 3 weeks ago

radames commented 1 month ago

Sorry if there is already an open issue for this, but here's a reminder to add the target: 'esnext' option when building custom components.

cc @pngwn

The currently workaround is do edit node_modules

go into your node modules/gradio/preview/dist/index.js
go into line ~278
add this in the build object: target: 'esnext',
then `gradio cc build ` again
pngwn commented 1 month ago

Thanks for this @radames, it did indeed slip my mind.

freddyaboulton commented 4 weeks ago

+1 just ran into this myself for the pdf component when trying to upgrade pdf.js