From fe76473cb19a01cd417e4bff4ca1c22128625e37 Mon Sep 17 00:00:00 2001 From: Jakub Freisler Date: Thu, 24 Sep 2020 11:10:25 +0200 Subject: [PATCH] fix: external css files path resolution --- lib/process-style.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/process-style.js b/lib/process-style.js index 98c4d959..9ecfd93b 100644 --- a/lib/process-style.js +++ b/lib/process-style.js @@ -53,7 +53,14 @@ module.exports = function processStyle(stylePart, filePath, config = {}) { const vueJestConfig = getVueJestConfig(config) if (stylePart.src && !stylePart.content) { - stylePart.content = loadSrc(stylePart.src, filePath) + const cssFilePath = applyModuleNameMapper( + stylePart.src, + filePath, + config, + stylePart.lang + ) + stylePart.content = loadSrc(cssFilePath, filePath) + filePath = cssFilePath } if (vueJestConfig.experimentalCSSCompile === false || !stylePart.content) {