Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-21 17:34:24 +01:00

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>
This commit is contained in:
silverwind 2021-05-07 21:12:37 +02:00 committed by GitHub
parent a4c13229b7
commit 4900881924
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 112 additions and 1283 deletions

1376
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -12,7 +12,6 @@
"clipboard": "2.0.8",
"codemirror": "5.61.0",
"css-loader": "5.2.4",
"css-minimizer-webpack-plugin": "2.0.0",
"dropzone": "5.9.2",
"easymde": "2.14.0",
"esbuild-loader": "2.12.0",
@ -28,7 +27,6 @@
"mini-css-extract-plugin": "1.5.0",
"monaco-editor": "0.23.0",
"monaco-editor-webpack-plugin": "3.0.1",
"postcss": "8.2.12",
"pretty-ms": "7.0.1",
"sortablejs": "1.13.0",
"swagger-ui-dist": "3.47.1",

View file

@ -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: {