File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,8 +20,9 @@ module.exports = (options = {}) => ({
2020 multiple : [ {
2121 // These will be handled by file-loader. We need the location because
2222 // they are parsed as URIs and will throw errors if not fully formed.
23+ // The !! prefix causes it to ignore other loaders (doesn't work).
2324 search : "require\\.toUrl\\(" ,
24- replace : "location.protocol + '//' + location.host + '/' + require('file-loader?name=[path][name].[ext]!' + " ,
25+ replace : "location.protocol + '//' + location.host + '/' + require('!! file-loader?name=[path][name].[ext]!' + " ,
2526 flags : "g" ,
2627 } , {
2728 search : "require\\.__\\$__nodeRequire" ,
@@ -59,8 +60,10 @@ module.exports = (options = {}) => ({
5960 test : / ( ^ .? | \. [ ^ d ] | [ ^ . ] d | [ ^ . ] [ ^ d ] ) \. t s x ? $ / ,
6061 } , {
6162 // Test CSS isn't required. The rest is supposed to be served in separate
62- // pages or iframes so we don't need to include it here.
63- exclude : / t e s t | c o d e \/ e l e c t r o n - b r o w s e r \/ .+ \. c s s $ / ,
63+ // pages or iframes so we don't need to include it here. Also excluding
64+ // markdown.css because even though it uses the file-loader as shown above
65+ // in the string replace, it's still making its way into the main CSS.
66+ exclude : / t e s t | c o d e \/ e l e c t r o n - b r o w s e r \/ .+ \. c s s $ | m a r k d o w n .c s s $ / ,
6467 test : / \. s ? c s s $ / ,
6568 // This is required otherwise it'll fail to resolve CSS in common.
6669 include : root ,
You can’t perform that action at this time.
0 commit comments