Skip to content

Commit 55f9c81

Browse files
code-asherkylecarbs
authored andcommitted
Fix markdown CSS being included in main CSS
1 parent ec515c0 commit 55f9c81

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

scripts/webpack.general.config.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ module.exports = (options = {}) => ({
2222
loader: "ignore-loader",
2323
}],
2424
}, {
25-
test: /electron-browser.+\.html$|code\/electron-browser\/.+\.css/,
25+
test: /electron-browser.+\.html$|code\/electron-browser\/.+\.css$|markdown\.css$/,
2626
use: [{
27-
loader: "ignore-loader",
27+
loader: "file-loader",
28+
options: {
29+
name: "[path][name].[ext]",
30+
},
2831
}],
2932
}, {
3033
test: /\.node$/,
@@ -35,9 +38,10 @@ module.exports = (options = {}) => ({
3538
}],
3639
test: /(^.?|\.[^d]|[^.]d|[^.][^d])\.tsx?$/,
3740
}, {
38-
// The CSS in code/electron-browser is supposed to be served in separate
39-
// pages so including it interferes with styles in vscode.
40-
exclude: /test|code\/electron-browser\/.+\.css/,
41+
// Test CSS isn't required. The rest is supposed to be served in separate
42+
// pages or iframes, so we need to skip it here and serve it with the file
43+
// loader instead.
44+
exclude: /test|code\/electron-browser\/.+\.css|markdown\.css$/,
4145
test: /\.s?css$/,
4246
// This is required otherwise it'll fail to resolve CSS in common.
4347
include: root,

0 commit comments

Comments
 (0)