mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-25 08:59:31 -05: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:
parent
a4c13229b7
commit
4900881924
3 changed files with 112 additions and 1283 deletions
1376
package-lock.json
generated
1376
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -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",
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in a new issue