mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
9bf16c2211
* api view with basic html * added base docs for raw inputs/outputs * reading correct url from frontend * styling * fill in the blank request snippet * post a request from docs * post button and random generator * styling * added view the api to interface * style changes * corrected input output docs * prefill with example instead of random * added curl and javascript syntax * removed scrollbars * API doc fixes * added correct docs to all pre/post processing methods * updated to new doc style * live demo with sample inputs * fixing golden screenshots * correct timeseries preprocess doc * correct timeseries preprocess doc * correct timeseries preprocess doc * fixed overwrite issue * remove static from git * fix merge * fix tests * fix tests * fix tests Co-authored-by: Ali Abid <you@example.comgit>
46 lines
1.2 KiB
JavaScript
46 lines
1.2 KiB
JavaScript
const path = require("path");
|
|
const webpack = require("webpack");
|
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
|
|
module.exports = {
|
|
webpack: {
|
|
plugins: [
|
|
new webpack.optimize.LimitChunkCountPlugin({
|
|
maxChunks: 1
|
|
}),
|
|
new MiniCssExtractPlugin({
|
|
filename: "static/bundle.css",
|
|
chunkFilename: "static/css/[name].chunk.css"
|
|
})
|
|
],
|
|
eslint: {
|
|
enable: true /* (default value) */,
|
|
mode: "extends" /* (default value) */ || "file"
|
|
},
|
|
configure: (webpackConfig, { env, paths }) => {
|
|
webpackConfig.optimization = {
|
|
splitChunks: {
|
|
cacheGroups: {
|
|
default: false
|
|
}
|
|
},
|
|
runtimeChunk: false
|
|
};
|
|
webpackConfig.entry = "./src/index";
|
|
webpackConfig.output = {
|
|
publicPath: "",
|
|
path: path.resolve(__dirname, "../gradio/templates/frontend"),
|
|
filename: "static/bundle.js",
|
|
chunkFilename: "static/js/[name].chunk.js"
|
|
};
|
|
paths.appBuild = webpackConfig.output.path;
|
|
return webpackConfig;
|
|
},
|
|
},
|
|
style: {
|
|
postcss: {
|
|
plugins: [require("tailwindcss"), require("autoprefixer")]
|
|
}
|
|
}
|
|
};
|