Skip to content

Commit fe76473

Browse files
author
Jakub Freisler
committed
fix: external css files path resolution
1 parent ce609a9 commit fe76473

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/process-style.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,14 @@ module.exports = function processStyle(stylePart, filePath, config = {}) {
5353
const vueJestConfig = getVueJestConfig(config)
5454

5555
if (stylePart.src && !stylePart.content) {
56-
stylePart.content = loadSrc(stylePart.src, filePath)
56+
const cssFilePath = applyModuleNameMapper(
57+
stylePart.src,
58+
filePath,
59+
config,
60+
stylePart.lang
61+
)
62+
stylePart.content = loadSrc(cssFilePath, filePath)
63+
filePath = cssFilePath
5764
}
5865

5966
if (vueJestConfig.experimentalCSSCompile === false || !stylePart.content) {

0 commit comments

Comments
 (0)