From 0c2148c037c4bc23a802c7a5580e3fed336ebe3e Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 7 Mar 2020 13:54:44 +0100 Subject: 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 --- webpack.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'webpack.config.js') 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; }, }, -- cgit v1.2.3