0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-22 07:13:02 -05:00

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>
This commit is contained in:
silverwind 2020-07-01 23:58:59 +02:00 committed by GitHub
parent 712d88ea1d
commit a87a64e6a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;