Skip to content

Commit

Permalink
Fix missing gitgraph css import (go-gitea#12112)
Browse files Browse the repository at this point in the history
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: go-gitea#11997

Co-authored-by: zeripath <[email protected]>
  • Loading branch information
2 people authored and Yohann Delafollye committed Jul 31, 2020
1 parent 2221c54 commit f767a5a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f767a5a

Please sign in to comment.