2021-05-29 00:14:00 +08:00
|
|
|
const path = require('path');
|
|
|
|
const webpack = require('webpack');
|
|
|
|
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
|
|
|
|
2021-05-13 00:29:18 +08:00
|
|
|
module.exports = {
|
2021-05-29 00:14:00 +08:00
|
|
|
webpack: {
|
|
|
|
plugins: [
|
|
|
|
new webpack.optimize.LimitChunkCountPlugin({
|
2021-05-29 01:04:03 +08:00
|
|
|
maxChunks: 1,
|
2021-05-29 00:14:00 +08:00
|
|
|
}),
|
|
|
|
new MiniCssExtractPlugin({
|
|
|
|
filename: "static/bundle.css",
|
|
|
|
chunkFilename: "static/css/[name].chunk.css",
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
configure: {
|
|
|
|
optimization: {
|
|
|
|
splitChunks: {
|
|
|
|
cacheGroups: {
|
|
|
|
default: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
runtimeChunk: false,
|
|
|
|
},
|
|
|
|
entry: './src/index',
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, '../gradio/frontend'),
|
|
|
|
filename: "static/bundle.js",
|
|
|
|
chunkFilename: "static/js/[name].chunk.js",
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
2021-05-13 00:29:18 +08:00
|
|
|
style: {
|
|
|
|
postcss: {
|
|
|
|
plugins: [
|
|
|
|
require('tailwindcss'),
|
|
|
|
require('autoprefixer'),
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|