Skip to content

Commit a85af49

Browse files
code-asherkylecarbs
authored andcommitted
Explicitly exclude markdown.css
Apparently !! doesn't work as advertised (or I don't understand how it's supposed to work).
1 parent c80b2fa commit a85af49

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/webpack.general.config.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff 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])\.tsx?$/,
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: /test|code\/electron-browser\/.+\.css$/,
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: /test|code\/electron-browser\/.+\.css$|markdown.css$/,
6467
test: /\.s?css$/,
6568
// This is required otherwise it'll fail to resolve CSS in common.
6669
include: root,

0 commit comments

Comments
 (0)