summaryrefslogtreecommitdiffstats
path: root/webpack.config.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-03-07 13:54:44 +0100
committerGitHub <noreply@github.com>2020-03-07 14:54:44 +0200
commit0c2148c037c4bc23a802c7a5580e3fed336ebe3e (patch)
tree144b841c43a27f58ed54f2f87995f72b3e76d6da /webpack.config.js
parenta5281895c71971e5ad4565445a17374e395aafa2 (diff)
downloadgitea-0c2148c037c4bc23a802c7a5580e3fed336ebe3e.tar.gz
gitea-0c2148c037c4bc23a802c7a5580e3fed336ebe3e.zip
Workaround fomantic build issue (#10655)
This blows up the fomantic CSS by around 500kB, but I see no other way. Ref: https://github.com/go-gitea/gitea/issues/10653
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/webpack.config.js b/webpack.config.js
index eac49f5cd6..dd8688406e 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,5 +1,6 @@
const cssnano = require('cssnano');
const fastGlob = require('fast-glob');
+const CopyPlugin = require('copy-webpack-plugin');
const FixStyleOnlyEntriesPlugin = require('webpack-fix-style-only-entries');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
@@ -191,6 +192,10 @@ module.exports = {
new SpriteLoaderPlugin({
plainSprite: true,
}),
+ new CopyPlugin([
+ // workaround for https://github.com/go-gitea/gitea/issues/10653
+ { from: 'node_modules/fomantic-ui/dist/semantic.min.css', to: 'fomantic/semantic.min.css' },
+ ]),
],
performance: {
hints: isProduction ? 'warning' : false,
@@ -198,7 +203,7 @@ module.exports = {
maxAssetSize: 512000,
assetFilter: (filename) => {
if (filename.endsWith('.map')) return false;
- if (['js/swagger.js', 'js/highlight.js'].includes(filename)) return false;
+ if (['js/swagger.js', 'js/highlight.js', 'fomantic/semantic.min.css'].includes(filename)) return false;
return true;
},
},