Fix markdown CSS being included in main CSS

This commit is contained in:
Asher 2019-02-04 13:40:06 -06:00 committed by Kyle Carberry
parent ec515c0a3f
commit 55f9c81516
No known key found for this signature in database
GPG Key ID: A0409BDB6B0B3EDB
1 changed files with 9 additions and 5 deletions

View File

@ -22,9 +22,12 @@ module.exports = (options = {}) => ({
loader: "ignore-loader", loader: "ignore-loader",
}], }],
}, { }, {
test: /electron-browser.+\.html$|code\/electron-browser\/.+\.css/, test: /electron-browser.+\.html$|code\/electron-browser\/.+\.css$|markdown\.css$/,
use: [{ use: [{
loader: "ignore-loader", loader: "file-loader",
options: {
name: "[path][name].[ext]",
},
}], }],
}, { }, {
test: /\.node$/, test: /\.node$/,
@ -35,9 +38,10 @@ module.exports = (options = {}) => ({
}], }],
test: /(^.?|\.[^d]|[^.]d|[^.][^d])\.tsx?$/, test: /(^.?|\.[^d]|[^.]d|[^.][^d])\.tsx?$/,
}, { }, {
// The CSS in code/electron-browser is supposed to be served in separate // Test CSS isn't required. The rest is supposed to be served in separate
// pages so including it interferes with styles in vscode. // pages or iframes, so we need to skip it here and serve it with the file
exclude: /test|code\/electron-browser\/.+\.css/, // loader instead.
exclude: /test|code\/electron-browser\/.+\.css|markdown\.css$/,
test: /\.s?css$/, test: /\.s?css$/,
// This is required otherwise it'll fail to resolve CSS in common. // This is required otherwise it'll fail to resolve CSS in common.
include: root, include: root,