gradio/frontend/craco.config.js
shubham-goel-zefr 79b5880473
Fixed video component's flagging method (#322)
* Fixed video component's flagging method

* fixed flagging for Image, Audio, File

* fixed flagging for Image, Audio, File

Co-authored-by: Ubuntu <ubuntu@ip-10-20-80-84.ec2.internal>
Co-authored-by: Ali Abid <you@example.comgit>
2021-10-28 17:29:04 -07:00

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")]
}
}
};