From 55f9c81516dab65f3531df27e92be17ea61d9687 Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 4 Feb 2019 13:40:06 -0600 Subject: [PATCH] Fix markdown CSS being included in main CSS --- scripts/webpack.general.config.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/webpack.general.config.js b/scripts/webpack.general.config.js index 1e853867c..d2c0fa83f 100644 --- a/scripts/webpack.general.config.js +++ b/scripts/webpack.general.config.js @@ -22,9 +22,12 @@ module.exports = (options = {}) => ({ loader: "ignore-loader", }], }, { - test: /electron-browser.+\.html$|code\/electron-browser\/.+\.css/, + test: /electron-browser.+\.html$|code\/electron-browser\/.+\.css$|markdown\.css$/, use: [{ - loader: "ignore-loader", + loader: "file-loader", + options: { + name: "[path][name].[ext]", + }, }], }, { test: /\.node$/, @@ -35,9 +38,10 @@ module.exports = (options = {}) => ({ }], test: /(^.?|\.[^d]|[^.]d|[^.][^d])\.tsx?$/, }, { - // The CSS in code/electron-browser is supposed to be served in separate - // pages so including it interferes with styles in vscode. - exclude: /test|code\/electron-browser\/.+\.css/, + // Test CSS isn't required. The rest is supposed to be served in separate + // pages or iframes, so we need to skip it here and serve it with the file + // loader instead. + exclude: /test|code\/electron-browser\/.+\.css|markdown\.css$/, test: /\.s?css$/, // This is required otherwise it'll fail to resolve CSS in common. include: root,