summaryrefslogtreecommitdiffstats
path: root/webpack.config.js
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2024-02-07 03:17:59 +0100
committerGitHub <noreply@github.com>2024-02-07 10:17:59 +0800
commit5849d4fde347cd1e47f2243b3239724c73b1261d (patch)
tree625ab4954c3771de5f7438fdefb6f24973c0eb16 /webpack.config.js
parentf9072dbf3c558ba5d4365b551d95936a52e4c94d (diff)
downloadgitea-5849d4fde347cd1e47f2243b3239724c73b1261d.tar.gz
gitea-5849d4fde347cd1e47f2243b3239724c73b1261d.zip
Remove lightningcss (#29070)
Remove lightningcss and minify with esbuild again. The size of output CSS will increase by around 1.4%, but I think it's worth it to allow building gitea in more cases like the one in the linked issue. We can reconsider once lightningcss becomes more stable. Fixes: https://github.com/go-gitea/gitea/issues/29058
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js11
1 files changed, 1 insertions, 10 deletions
diff --git a/webpack.config.js b/webpack.config.js
index c4b140a12b..16afa0ff9c 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -55,12 +55,6 @@ const filterCssImport = (url, ...args) => {
return true;
};
-// in case lightningcss fails to load, fall back to esbuild for css minify
-let LightningCssMinifyPlugin;
-try {
- ({LightningCssMinifyPlugin} = await import('lightningcss-loader'));
-} catch {}
-
/** @type {import("webpack").Configuration} */
export default {
mode: isProduction ? 'production' : 'development',
@@ -106,12 +100,9 @@ export default {
new EsbuildPlugin({
target: 'es2020',
minify: true,
- css: !LightningCssMinifyPlugin,
+ css: true,
legalComments: 'none',
}),
- LightningCssMinifyPlugin && new LightningCssMinifyPlugin({
- sourceMap: sourceMaps === 'true',
- }),
],
splitChunks: {
chunks: 'async',