aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-07-01 23:58:59 +0200
committerGitHub <noreply@github.com>2020-07-01 22:58:59 +0100
commita87a64e6a1f2e3e673fc24818bd17f7225f921f6 (patch)
tree1315c6037665ba21419fddf14dbbf65e139b5877
parent712d88ea1d80b7a5743b5d59ab072c115c3f48df (diff)
downloadgitea-a87a64e6a1f2e3e673fc24818bd17f7225f921f6.tar.gz
gitea-a87a64e6a1f2e3e673fc24818bd17f7225f921f6.zip
Fix missing gitgraph css import (#12112)
The filter was wrongly excluding the gitGraph.css file. Need to clean this up later so that imports are always relative to the source file (which is not the case for fonts right now). Regressed by: https://github.com/go-gitea/gitea/pull/11997 Co-authored-by: zeripath <art27@cantab.net>
-rw-r--r--webpack.config.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/webpack.config.js b/webpack.config.js
index 9d398da91a..2ed374ba49 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -25,6 +25,8 @@ const isProduction = process.env.NODE_ENV !== 'development';
const filterCssImport = (parsedImport, cssFile) => {
const url = parsedImport && parsedImport.url ? parsedImport.url : parsedImport;
const importedFile = url.replace(/[?#].+/, '').toLowerCase();
+ if (/vendor\/assets/.test(url)) return false; // font imports
+ if (/web_src[/\\]less/.test(cssFile)) return true; // relative imports
if (cssFile.includes('monaco')) return true;
if (cssFile.includes('fomantic')) {
if (/brand-icons/.test(importedFile)) return false;