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

Add build target option to the custom component gradio.config.js file #8520

Merged
merged 7 commits into from
Jun 10, 2024

Conversation

pngwn
Copy link
Member

@pngwn pngwn commented Jun 10, 2024

Adds build.target option to the gradio custom component config options. Defaults to "modules" which is Vite's default value making this backwards compatible.

cc @radames @freddyaboulton

Closes #8416.

@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Jun 10, 2024

🪼 branch checks and previews

Name Status URL
Spaces ready! Spaces preview
Website ready! Website preview
Storybook ready! Storybook preview
🦄 Changes detected! Details

Install Gradio from this PR

pip install https://gradio-builds.s3.amazonaws.com/bd261008a1ee5945a7d366da69ce026914329800/gradio-4.36.1-py3-none-any.whl

Install Gradio Python Client from this PR

pip install "gradio-client @ git+https://github.com/gradio-app/gradio@bd261008a1ee5945a7d366da69ce026914329800#subdirectory=client/python"

Install Gradio JS Client from this PR

npm install https://gradio-builds.s3.amazonaws.com/bd261008a1ee5945a7d366da69ce026914329800/gradio-client-1.1.1.tgz

@pngwn pngwn changed the title 8416 cc build target Add build target option to the custom component gradio.config.js file Jun 10, 2024
@gradio-pr-bot
Copy link
Collaborator

gradio-pr-bot commented Jun 10, 2024

🦄 change detected

This Pull Request includes changes to the following packages.

Package Version
@gradio/preview minor
gradio minor
  • Maintainers can select this checkbox to manually select packages to update.

With the following changelog entry.

Add build target option to the custom component gradio.config.js file

Maintainers or the PR author can modify the PR title to modify this entry.

Something isn't right?

  • Maintainers can change the version label to modify the version bump.
  • If the bot has failed to detect any changes, or if this pull request needs to update multiple packages to different versions or requires a more comprehensive changelog entry, maintainers can update the changelog file directly.

@abidlabs abidlabs requested a review from freddyaboulton June 10, 2024 16:38
Copy link
Collaborator

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works 🔥

Two suggestions:

  • Add the default build option in the default gradio.config.js so that people know it exists
  • Add docs

@radames
Copy link
Contributor

radames commented Jun 10, 2024

Nice suggestion @freddyaboulton !

@pngwn
Copy link
Member Author

pngwn commented Jun 10, 2024

what is this 'doc' that you speak of?

@pngwn
Copy link
Member Author

pngwn commented Jun 10, 2024

Added the default value to the template and added the options to the configuration section of the frontend custom component guide.

@freddyaboulton
Copy link
Collaborator

Lovely!

@radames
Copy link
Contributor

radames commented Jun 10, 2024

I'll be watching you release this fix! Thanks, all.

@pngwn pngwn merged commit 595ecf3 into main Jun 10, 2024
8 checks passed
@pngwn pngwn deleted the 8416-cc-build-target branch June 10, 2024 19:16
@pngwn pngwn mentioned this pull request Jun 10, 2024
@pngwn pngwn mentioned this pull request Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Custom Components] Option for build target
4 participants