aboutsummaryrefslogtreecommitdiffstats
path: root/webpack.config.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2021-05-07 21:12:37 +0200
committerGitHub <noreply@github.com>2021-05-07 15:12:37 -0400
commit4900881924b3762e10b01d67565035faf7cb02da (patch)
tree1608d7f7bb9a29614d9e36b4e63dd2930320ac01 /webpack.config.js
parenta4c13229b7e8db2f8eaf628d1f0d67836c782ea2 (diff)
downloadgitea-4900881924b3762e10b01d67565035faf7cb02da.tar.gz
gitea-4900881924b3762e10b01d67565035faf7cb02da.zip
Use esbuild to minify CSS (#15756)
It's about a 30% speedup in webpack build time with neglible differences in the output size. We do lose the ability for CSS source maps, but I rarely have a use for them anyways. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js17
1 files changed, 2 insertions, 15 deletions
diff --git a/webpack.config.js b/webpack.config.js
index dd84eb44f8..ec0fa1ad04 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -1,7 +1,6 @@
import fastGlob from 'fast-glob';
import wrapAnsi from 'wrap-ansi';
import AddAssetPlugin from 'add-asset-webpack-plugin';
-import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
import LicenseCheckerWebpackPlugin from 'license-checker-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import MonacoWebpackPlugin from 'monaco-editor-webpack-plugin';
@@ -85,20 +84,8 @@ export default {
minimizer: [
new ESBuildMinifyPlugin({
target: 'es2015',
- minify: true
- }),
- new CssMinimizerPlugin({
- minimizerOptions: {
- preset: [
- 'default',
- {
- discardComments: {
- removeAll: true,
- },
- colormin: false,
- },
- ],
- },
+ minify: true,
+ css: true,
}),
],
splitChunks: {