Skip to content

Commit

Permalink
fix: external css files path resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Freisler committed Sep 24, 2020
1 parent ce609a9 commit fe76473
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/process-style.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fe76473

Please sign in to comment.