Closed Col0ring closed 6 months ago
Yep. I'm working on this atm! Should have something shortly!
@Col0ring Could you tell me more about your use case and what kind of configuration you would need/ be interested in?
@Col0ring Could you tell me more about your use case and what kind of configuration you would need/ be interested in?
@pngwn I'm using react
to build custom components, and there are two problems:
1.can't use react and jsx at runtime.
2.need to define some global replacements for cjs variables.
I think it will be helpful to allow custom vite options (for server and build mode).
like this:
// gradio.config.ts/js
import react from '@vitejs/plugin-react-swc';
export default defineConfg({
// `plugins`, `define` and other useful vite options
viteConfig: {
plugins:[react()],
define: {
// for react
'process.env.NODE_ENV': JSON.stringify('production'),
},
}
})
​
Is your feature request related to a problem? Please describe.
Some javascript libraries need additional processing to be used correctly, could gradio provide some configuration to do this?
Additional context
I found this PR before: https://github.com/gradio-app/gradio/pull/6787, will there be more updates?